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

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

Issue 213493002: content: Add multi-proc surface texture support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
« no previous file with comments | « content/browser/gpu/browser_gpu_channel_host_factory.cc ('k') | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 32345b728004ebb1ee017b1268b425e65143ed2d..2ef5fc2837b99852f28d1926a9ae6167335e2c9d 100644
--- a/content/browser/gpu/gpu_process_host.h
+++ b/content/browser/gpu/gpu_process_host.h
@@ -63,6 +63,8 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
typedef base::Callback<void(const gfx::Size)> CreateImageCallback;
+ typedef base::Closure CreateSurfaceTextureCallback;
+
static bool gpu_enabled() { return gpu_enabled_; }
// Creates a new GpuProcessHost or gets an existing one, resulting in the
@@ -124,6 +126,12 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
// Tells the GPU process to delete image.
void DeleteImage(int client_id, int image_id, int sync_point);
+ // Tells the GPU process to create a new surface texture using the given id.
+ void CreateSurfaceTexture(
+ int surface_texture_id,
+ base::ProcessHandle process_handle,
+ const CreateSurfaceTextureCallback& callback);
+
// What kind of GPU process, e.g. sandboxed or unsandboxed.
GpuProcessKind kind();
@@ -158,6 +166,7 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
void OnCommandBufferCreated(const int32 route_id);
void OnDestroyCommandBuffer(int32 surface_id);
void OnImageCreated(const gfx::Size size);
+ void OnSurfaceTextureCreated();
void OnDidCreateOffscreenContext(const GURL& url);
void OnDidLoseContext(bool offscreen,
gpu::error::ContextLostReason reason,
@@ -205,6 +214,8 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
// The pending create image requests we need to reply to.
std::queue<CreateImageCallback> create_image_requests_;
+ // The pending create surface texture requests we need to reply to.
+ std::queue<CreateSurfaceTextureCallback> create_surface_texture_requests_;
// Qeueud messages to send when the process launches.
std::queue<IPC::Message*> queued_messages_;
« no previous file with comments | « content/browser/gpu/browser_gpu_channel_host_factory.cc ('k') | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698