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

Unified Diff: chrome/browser/gpu_process_host_ui_shim.h

Issue 6840060: Progress towards fixing 77536 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "" Created 9 years, 8 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 | « no previous file | chrome/browser/gpu_process_host_ui_shim.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gpu_process_host_ui_shim.h
diff --git a/chrome/browser/gpu_process_host_ui_shim.h b/chrome/browser/gpu_process_host_ui_shim.h
index 8bcdb23a7434054954268942028e0821e7e1be7d..cd834a55e127620493a3f9d17d3772fb114cbf65 100644
--- a/chrome/browser/gpu_process_host_ui_shim.h
+++ b/chrome/browser/gpu_process_host_ui_shim.h
@@ -122,6 +122,7 @@ class GpuProcessHostUIShim
// Tells the GPU process to create a new command buffer that draws into the
// window associated with the given renderer.
void CreateViewCommandBuffer(
+ gfx::PluginWindowHandle compositing_surface,
int32 render_view_id,
int32 renderer_id,
const GPUCreateCommandBufferConfig& init_params,
@@ -197,16 +198,21 @@ class GpuProcessHostUIShim
std::queue<linked_ptr<CreateCommandBufferCallback> >
create_command_buffer_requests_;
+#if defined(OS_LINUX)
typedef std::pair<int32 /* renderer_id */,
int32 /* render_view_id */> ViewID;
- // Encapsulates surfaces that we acquire when creating view command buffers.
- // We assume that a render view has at most 1 such surface associated
- // with it. Multimap is used to simulate reference counting, see comment in
+ // 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
+ // while the GPU process is drawing to it.
+
+ // Multimap is used to simulate reference counting, see comment in
// GpuProcessHostUIShim::CreateViewCommandBuffer.
- class ViewSurface;
- typedef std::multimap<ViewID, linked_ptr<ViewSurface> > ViewSurfaceMap;
- ViewSurfaceMap acquired_surfaces_;
+ class SurfaceRef;
+ typedef std::multimap<ViewID, linked_ptr<SurfaceRef> > SurfaceRefMap;
+ SurfaceRefMap surface_refs_;
+#endif
// In single process and in process GPU mode, this references the
// GpuChannelManager or null otherwise. It must be called and deleted on the
« no previous file with comments | « no previous file | chrome/browser/gpu_process_host_ui_shim.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698