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

Unified Diff: content/common/gpu/gpu_command_buffer_stub.cc

Issue 6993043: Fix the mac hangup when force-compositing-mode is enabled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disabled CVDisplayLink code, seems to work Created 9 years, 6 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
Index: content/common/gpu/gpu_command_buffer_stub.cc
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index b5392270f199015d5d2d6ce148fbd7162eb69d01..e9d30a78c3494406b06e1e47efddaddbe781adc0 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -395,14 +395,25 @@ void GpuCommandBufferStub::AcceleratedSurfaceBuffersSwapped(
scheduler_->set_acknowledged_swap_buffers_count(swap_buffers_count);
- for(uint64 i = 0; i < delta; i++)
+ for(uint64 i = 0; i < delta; i++) {
OnSwapBuffers();
- // Wake up the GpuScheduler to start doing work again.
- scheduler_->SetScheduled(true);
+ // Wake up the GpuScheduler to start doing work again.
+ scheduler_->SetScheduled(true);
jbates 2011/06/07 16:47:52 This was a bug that would allow the scheduled_coun
+ }
}
#endif // defined(OS_MACOSX)
+void GpuCommandBufferStub::CommandBufferWasDestroyed() {
+ TRACE_EVENT0("gpu", "GpuCommandBufferStub::CommandBufferWasDestroyed");
+ while (!scheduler_->IsScheduled())
+ scheduler_->SetScheduled(true);
+ // Handle all deferred messages now, because the stub route is about to be
+ // removed by the GpuChannel. The PostTask handling may not work if the route
+ // is already removed.
+ HandleDeferredMessages();
+}
+
void GpuCommandBufferStub::ResizeCallback(gfx::Size size) {
if (handle_ == gfx::kNullPluginWindow) {
scheduler_->decoder()->ResizeOffscreenFrameBuffer(size);

Powered by Google App Engine
This is Rietveld 408576698