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

Unified Diff: content/common/gpu/gpu_channel.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: comments 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_channel.cc
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc
index b7a8349c81543f2bae25cd4015a674f6fd282bed..81563c53097fec6b38534a4218579d312f69fb03 100644
--- a/content/common/gpu/gpu_channel.cc
+++ b/content/common/gpu/gpu_channel.cc
@@ -9,6 +9,7 @@
#include "content/common/gpu/gpu_channel.h"
#include "base/command_line.h"
+#include "base/debug/trace_event.h"
#include "base/process_util.h"
#include "base/string_util.h"
#include "content/common/child_process.h"
@@ -254,6 +255,8 @@ void GpuChannel::OnCreateOffscreenCommandBuffer(
0, 0, watchdog_));
router_.AddRoute(*route_id, stub.get());
stubs_.AddWithID(stub.release(), *route_id);
+ TRACE_EVENT1("gpu", "GpuChannel::OnCreateOffscreenCommandBuffer",
+ "route_id", route_id);
#else
*route_id = MSG_ROUTING_NONE;
#endif
@@ -261,7 +264,14 @@ void GpuChannel::OnCreateOffscreenCommandBuffer(
void GpuChannel::OnDestroyCommandBuffer(int32 route_id) {
#if defined(ENABLE_GPU)
+ TRACE_EVENT1("gpu", "GpuChannel::OnDestroyCommandBuffer",
+ "route_id", route_id);
if (router_.ResolveRoute(route_id)) {
+ GpuCommandBufferStub* stub = stubs_.Lookup(route_id);
+ // In case the renderer is currently blocked waiting for a sync reply from
+ // the stub, allow the stub to clean up and unblock pending messages here:
+ if (stub != NULL)
+ stub->CommandBufferWasDestroyed();
router_.RemoveRoute(route_id);
stubs_.Remove(route_id);
}

Powered by Google App Engine
This is Rietveld 408576698