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)); |
} |