Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(653)

Unified Diff: content/browser/gpu/gpu_process_host.h

Issue 10543125: gpu: Add support for GLX_EXT_texture_from_pixmap extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move CreateGLImage below virtual methods. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..03385bd867105af6be00df2793597f05658f13a1 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);
+
// 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)

Powered by Google App Engine
This is Rietveld 408576698