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

Unified Diff: chrome/gpu/gpu_command_buffer_stub.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_command_buffer_stub.cc
diff --git a/chrome/gpu/gpu_command_buffer_stub.cc b/chrome/gpu/gpu_command_buffer_stub.cc
index 6ad18bca304c7077858f769002aa74b28d168c22..bf3b2d01170f0658e31139697e378ee36fc14e37 100644
--- a/chrome/gpu/gpu_command_buffer_stub.cc
+++ b/chrome/gpu/gpu_command_buffer_stub.cc
@@ -281,6 +281,11 @@ void GpuCommandBufferStub::OnAsyncGetState() {
void GpuCommandBufferStub::OnFlush(int32 put_offset,
gpu::CommandBuffer::State* state) {
+#if defined(OS_MACOSX)
+ // See comment in |DidDestroySurface()| in gpu_processor_mac.cc.
+ if (channel_->IsRenderViewGone(render_view_id_))
+ processor_->DidDestroySurface();
+#endif
*state = command_buffer_->Flush(put_offset);
}
@@ -353,9 +358,7 @@ void GpuCommandBufferStub::SwapBuffersCallback() {
params.window = handle_;
params.surface_id = processor_->GetSurfaceId();
params.route_id = route_id();
-#if defined(OS_MACOSX)
params.swap_buffers_count = processor_->swap_buffers_count();
-#endif // defined(OS_MACOSX)
gpu_thread->Send(new GpuHostMsg_AcceleratedSurfaceBuffersSwapped(params));
}

Powered by Google App Engine
This is Rietveld 408576698