| Index: content/browser/gpu/gpu_process_host.h
|
| diff --git a/content/browser/gpu/gpu_process_host.h b/content/browser/gpu/gpu_process_host.h
|
| index 17adefc088953cf37899020f9c98658d352b8cfa..079b549a597bf93024f3e52ca2ee6b923cf0251e 100644
|
| --- a/content/browser/gpu/gpu_process_host.h
|
| +++ b/content/browser/gpu/gpu_process_host.h
|
| @@ -34,6 +34,10 @@ struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params;
|
| struct GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params;
|
| struct GpuHostMsg_AcceleratedSurfaceRelease_Params;
|
|
|
| +namespace gfx {
|
| +struct GpuMemoryBufferHandle;
|
| +}
|
| +
|
| namespace IPC {
|
| struct ChannelHandle;
|
| }
|
| @@ -63,6 +67,9 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
|
|
|
| typedef base::Callback<void(const gfx::Size)> CreateImageCallback;
|
|
|
| + typedef base::Callback<void(const gfx::GpuMemoryBufferHandle& handle)>
|
| + CreateGpuMemoryBufferCallback;
|
| +
|
| static bool gpu_enabled() { return gpu_enabled_; }
|
|
|
| // Creates a new GpuProcessHost or gets an existing one, resulting in the
|
| @@ -125,6 +132,14 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
|
| // Tells the GPU process to delete image.
|
| void DeleteImage(int client_id, int image_id, int sync_point);
|
|
|
| + void CreateGpuMemoryBuffer(const gfx::GpuMemoryBufferHandle& handle,
|
| + const gfx::Size& size,
|
| + unsigned internalformat,
|
| + unsigned usage,
|
| + const CreateGpuMemoryBufferCallback& callback);
|
| + void DestroyGpuMemoryBuffer(const gfx::GpuMemoryBufferHandle& handle,
|
| + int sync_point);
|
| +
|
| // What kind of GPU process, e.g. sandboxed or unsandboxed.
|
| GpuProcessKind kind();
|
|
|
| @@ -159,6 +174,7 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
|
| void OnCommandBufferCreated(bool succeeded);
|
| void OnDestroyCommandBuffer(int32 surface_id);
|
| void OnImageCreated(const gfx::Size size);
|
| + void OnGpuMemoryBufferCreated(const gfx::GpuMemoryBufferHandle& handle);
|
| void OnDidCreateOffscreenContext(const GURL& url);
|
| void OnDidLoseContext(bool offscreen,
|
| gpu::error::ContextLostReason reason,
|
| @@ -196,6 +212,8 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
|
| // The pending create image requests we need to reply to.
|
| std::queue<CreateImageCallback> create_image_requests_;
|
|
|
| + // The pending create gpu memory buffer requests we need to reply to.
|
| + std::queue<CreateGpuMemoryBufferCallback> create_gpu_memory_buffer_requests_;
|
|
|
| // Qeueud messages to send when the process launches.
|
| std::queue<IPC::Message*> queued_messages_;
|
|
|