| Index: gpu/command_buffer/service/in_process_command_buffer.h
|
| diff --git a/gpu/command_buffer/service/in_process_command_buffer.h b/gpu/command_buffer/service/in_process_command_buffer.h
|
| index 9bdbd49616d2797d382f53b900ae419802a4ddb7..03c0f4248ceb03b718776b8ade8f12e6999c09ea 100644
|
| --- a/gpu/command_buffer/service/in_process_command_buffer.h
|
| +++ b/gpu/command_buffer/service/in_process_command_buffer.h
|
| @@ -14,6 +14,7 @@
|
| #include "base/synchronization/lock.h"
|
| #include "base/synchronization/waitable_event.h"
|
| #include "gpu/command_buffer/common/command_buffer.h"
|
| +#include "gpu/command_buffer/common/gpu_control.h"
|
| #include "gpu/gpu_export.h"
|
| #include "ui/gfx/gpu_memory_buffer.h"
|
| #include "ui/gfx/native_widget_types.h"
|
| @@ -26,7 +27,6 @@ class SequenceChecker;
|
|
|
| namespace gfx {
|
| class GLContext;
|
| -class GLImage;
|
| class GLSurface;
|
| class Size;
|
| }
|
| @@ -37,6 +37,7 @@ namespace gles2 {
|
| class GLES2Decoder;
|
| }
|
|
|
| +class GpuMemoryBufferFactory;
|
| class GpuScheduler;
|
| class TransferBufferManagerInterface;
|
|
|
| @@ -44,7 +45,8 @@ class TransferBufferManagerInterface;
|
| // example GPU thread) when being run in single process mode.
|
| // However, the behavior for accessing one context (i.e. one instance of this
|
| // class) from different client threads is undefined.
|
| -class GPU_EXPORT InProcessCommandBuffer : public CommandBuffer {
|
| +class GPU_EXPORT InProcessCommandBuffer : public CommandBuffer,
|
| + public GpuControl {
|
| public:
|
| InProcessCommandBuffer();
|
| virtual ~InProcessCommandBuffer();
|
| @@ -61,6 +63,7 @@ class GPU_EXPORT InProcessCommandBuffer : public CommandBuffer {
|
| static void ProcessGpuWorkOnCurrentThread();
|
|
|
| static void EnableVirtualizedContext();
|
| + static void SetGpuMemoryBufferFactory(GpuMemoryBufferFactory* factory);
|
|
|
| // If |surface| is not NULL, use it directly; in this case, the command
|
| // buffer gpu thread must be the same as the client thread. Otherwise create
|
| @@ -78,10 +81,6 @@ class GPU_EXPORT InProcessCommandBuffer : public CommandBuffer {
|
| void Destroy();
|
| void SignalSyncPoint(unsigned sync_point,
|
| const base::Closure& callback);
|
| - unsigned int CreateImageForGpuMemoryBuffer(
|
| - gfx::GpuMemoryBufferHandle buffer,
|
| - gfx::Size size);
|
| - void RemoveImage(unsigned int image_id);
|
|
|
| // CommandBuffer implementation:
|
| virtual bool Initialize() OVERRIDE;
|
| @@ -102,6 +101,14 @@ class GPU_EXPORT InProcessCommandBuffer : public CommandBuffer {
|
| virtual uint32 InsertSyncPoint() OVERRIDE;
|
| virtual gpu::error::Error GetLastError() OVERRIDE;
|
|
|
| + // GpuControl implementation:
|
| + virtual gfx::GpuMemoryBuffer* CreateGpuMemoryBuffer(
|
| + size_t width,
|
| + size_t height,
|
| + unsigned internalformat,
|
| + int32* id) OVERRIDE;
|
| + virtual void DestroyGpuMemoryBuffer(int32 id) OVERRIDE;
|
| +
|
| // The serializer interface to the GPU service (i.e. thread).
|
| class SchedulerClient {
|
| public:
|
| @@ -118,10 +125,6 @@ class GPU_EXPORT InProcessCommandBuffer : public CommandBuffer {
|
| gfx::GpuPreference gpu_preference);
|
| bool DestroyOnGpuThread();
|
| void FlushOnGpuThread(int32 put_offset);
|
| - void CreateImageOnGpuThread(gfx::GpuMemoryBufferHandle buffer,
|
| - gfx::Size size,
|
| - unsigned int image_id);
|
| - void RemoveImageOnGpuThread(unsigned int image_id);
|
| bool MakeCurrent();
|
| bool IsContextLost();
|
| base::Closure WrapCallback(const base::Closure& callback);
|
| @@ -158,6 +161,7 @@ class GPU_EXPORT InProcessCommandBuffer : public CommandBuffer {
|
| scoped_ptr<SchedulerClient> queue_;
|
| State state_after_last_flush_;
|
| base::Lock state_after_last_flush_lock_;
|
| + scoped_ptr<GpuControl> gpu_control_;
|
|
|
| // Only used with explicit scheduling and the gpu thread is the same as
|
| // the client thread.
|
|
|