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

Unified Diff: chrome/gpu/gpu_channel.cc

Issue 6076005: Mac: Don't hang gpu process on popup close under certain conditions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: final touches Created 10 years 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: chrome/gpu/gpu_channel.cc
diff --git a/chrome/gpu/gpu_channel.cc b/chrome/gpu/gpu_channel.cc
index 77413914f5eeff76f1c3aef497575dcdf29e3d3a..8fb5024af6c548108a517db099b2edbf280942a7 100644
--- a/chrome/gpu/gpu_channel.cc
+++ b/chrome/gpu/gpu_channel.cc
@@ -79,6 +79,19 @@ void GpuChannel::AcceleratedSurfaceBuffersSwapped(
return;
stub->AcceleratedSurfaceBuffersSwapped(swap_buffers_count);
}
+
+void GpuChannel::DidDestroySurface(int32 renderer_route_id) {
+ // Since acclerated views are created in the renderer process and then sent
+ // to the browser process during GPU channel construction, it is possible that
+ // this is called before a GpuCommandBufferStub for |renderer_route_id| was
+ // put into |stubs_|. Hence, do not walk |stubs_| here but instead remember
+ // all |renderer_route_id|s this was called for and use them later.
+ destroyed_renderer_routes_.insert(renderer_route_id);
+}
+
+bool GpuChannel::IsRenderViewGone(int32 renderer_route_id) {
+ return destroyed_renderer_routes_.count(renderer_route_id) > 0;
+}
#endif
void GpuChannel::OnControlMessageReceived(const IPC::Message& msg) {

Powered by Google App Engine
This is Rietveld 408576698