diff options
author | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-18 22:29:56 +0000 |
---|---|---|
committer | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-18 22:29:56 +0000 |
commit | 9f4f3322e7c9a5feedd5ca2b986daf2f8d5b8d3d (patch) | |
tree | a67a3d0397a03e12ee51aa8720f612c62c20e936 /content/browser/gpu/gpu_process_host.h | |
parent | a3102766e725636ad23ad99faa1e8a481a1129e7 (diff) | |
download | chromium_src-9f4f3322e7c9a5feedd5ca2b986daf2f8d5b8d3d.zip chromium_src-9f4f3322e7c9a5feedd5ca2b986daf2f8d5b8d3d.tar.gz chromium_src-9f4f3322e7c9a5feedd5ca2b986daf2f8d5b8d3d.tar.bz2 |
gpu: reference target surfaces through a globally unique surface id.
This allows the gpu process to ignore all knowledge of renderers. It simplifies
some of the gpu <-> browser and gpu <-> renderer IPC, but mostly paves the way
for non-renderer clients.
Surfaces are kept in a global GpuSurfaceTracker which is just a thread-safe map.
BUG=99516
TEST=covered by existing tests. Run chrome, open poster circle (or other accelerated content page).
Review URL: http://codereview.chromium.org/9194005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118172 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/gpu/gpu_process_host.h')
-rw-r--r-- | content/browser/gpu/gpu_process_host.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/content/browser/gpu/gpu_process_host.h b/content/browser/gpu/gpu_process_host.h index 295803a..29ec0df 100644 --- a/content/browser/gpu/gpu_process_host.h +++ b/content/browser/gpu/gpu_process_host.h @@ -75,8 +75,8 @@ class GpuProcessHost : public BrowserChildProcessHost, // window associated with the given renderer. void CreateViewCommandBuffer( gfx::PluginWindowHandle compositing_surface, - int32 render_view_id, - int32 client_id, + int surface_id, + int client_id, const GPUCreateCommandBufferConfig& init_params, const CreateCommandBufferCallback& callback); @@ -100,8 +100,7 @@ class GpuProcessHost : public BrowserChildProcessHost, // Message handlers. void OnChannelEstablished(const IPC::ChannelHandle& channel_handle); void OnCommandBufferCreated(const int32 route_id); - void OnDestroyCommandBuffer( - gfx::PluginWindowHandle window, int32 client_id, int32 render_view_id); + void OnDestroyCommandBuffer(int32 surface_id); bool LaunchGpuProcess(const std::string& channel_id); @@ -125,9 +124,6 @@ class GpuProcessHost : public BrowserChildProcessHost, std::queue<CreateCommandBufferCallback> create_command_buffer_requests_; #if defined(TOOLKIT_USES_GTK) - typedef std::pair<int32 /* client_id */, - int32 /* render_view_id */> ViewID; - // Encapsulates surfaces that we lock when creating view command buffers. // We release this lock once the command buffer (or associated GPU process) // is destroyed. This prevents the browser from destroying the surface @@ -136,7 +132,7 @@ class GpuProcessHost : public BrowserChildProcessHost, // Multimap is used to simulate reference counting, see comment in // GpuProcessHostUIShim::CreateViewCommandBuffer. class SurfaceRef; - typedef std::multimap<ViewID, linked_ptr<SurfaceRef> > SurfaceRefMap; + typedef std::multimap<int, linked_ptr<SurfaceRef> > SurfaceRefMap; SurfaceRefMap surface_refs_; #endif |