Chromium Code Reviews| Index: content/common/gpu/gpu_channel.cc |
| diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc |
| index 72d822b999911dfbfb59d6d11bfde42e1a62cb31..85333800260bdf9e95729709a1380e783807b63d 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" |
| @@ -251,6 +252,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 |
| @@ -258,7 +261,12 @@ 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); |
| + if (stub != NULL) |
| + stub->CommandBufferWasDestroyed(); |
|
jbates
2011/06/07 16:47:52
If the IPC route is removed, unblock the stub so t
|
| router_.RemoveRoute(route_id); |
| stubs_.Remove(route_id); |
| } |