| 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 f4b834107a1b65618d6f355f39f96ca7599551a2..1ecd7d3541078cfecf1c2cf3d1cac8c6438d1d30 100644
|
| --- a/content/browser/gpu/gpu_process_host.h
|
| +++ b/content/browser/gpu/gpu_process_host.h
|
| @@ -20,6 +20,7 @@
|
| #include "content/public/common/gpu_info.h"
|
| #include "ipc/ipc_sender.h"
|
| #include "ui/gfx/native_widget_types.h"
|
| +#include "ui/gfx/size.h"
|
|
|
| class GpuMainThread;
|
| struct GPUCreateCommandBufferConfig;
|
| @@ -49,6 +50,8 @@ class GpuProcessHost : public content::BrowserChildProcessHostDelegate,
|
|
|
| typedef base::Callback<void(int32)> CreateCommandBufferCallback;
|
|
|
| + typedef base::Callback<void(const gfx::Size)> CreateImageCallback;
|
| +
|
| static bool gpu_enabled() { return gpu_enabled_; }
|
|
|
| // Creates a new GpuProcessHost or gets an existing one, resulting in the
|
| @@ -90,6 +93,16 @@ class GpuProcessHost : public content::BrowserChildProcessHostDelegate,
|
| const GPUCreateCommandBufferConfig& init_params,
|
| const CreateCommandBufferCallback& callback);
|
|
|
| + // Tells the GPU process to create a new image using the given window.
|
| + void CreateImage(
|
| + gfx::PluginWindowHandle window,
|
| + int client_id,
|
| + int image_id,
|
| + const CreateImageCallback& callback);
|
| +
|
| + // Tells the GPU process to delete image.
|
| + void DeleteImage(int client_id, int image_id, int sync_point);
|
| +
|
| // Whether this GPU process is set up to use software rendering.
|
| bool software_rendering();
|
|
|
| @@ -120,6 +133,7 @@ class GpuProcessHost : public content::BrowserChildProcessHostDelegate,
|
| void OnChannelEstablished(const IPC::ChannelHandle& channel_handle);
|
| void OnCommandBufferCreated(const int32 route_id);
|
| void OnDestroyCommandBuffer(int32 surface_id);
|
| + void OnImageCreated(const gfx::Size size);
|
|
|
| #if defined(OS_MACOSX)
|
| void OnAcceleratedSurfaceBuffersSwapped(
|
| @@ -146,6 +160,8 @@ class GpuProcessHost : public content::BrowserChildProcessHostDelegate,
|
| const content::GPUInfo& gpu_info);
|
| void CreateCommandBufferError(const CreateCommandBufferCallback& callback,
|
| int32 route_id);
|
| + void CreateImageError(const CreateImageCallback& callback,
|
| + const gfx::Size size);
|
|
|
| // The serial number of the GpuProcessHost / GpuProcessHostUIShim pair.
|
| int host_id_;
|
| @@ -157,6 +173,9 @@ class GpuProcessHost : public content::BrowserChildProcessHostDelegate,
|
| // The pending create command buffer requests we need to reply to.
|
| std::queue<CreateCommandBufferCallback> create_command_buffer_requests_;
|
|
|
| + // The pending create image requests we need to reply to.
|
| + std::queue<CreateImageCallback> create_image_requests_;
|
| +
|
| #if defined(TOOLKIT_GTK)
|
| // Encapsulates surfaces that we lock when creating view command buffers.
|
| // We release this lock once the command buffer (or associated GPU process)
|
|
|