diff options
author | amarinichev@chromium.org <amarinichev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-19 00:06:53 +0000 |
---|---|---|
committer | amarinichev@chromium.org <amarinichev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-19 00:06:53 +0000 |
commit | 83d8632524a4540f96abfe2fd86a3eaae35e2191 (patch) | |
tree | 49752f12e06bb8f189b3500185a4375193f36758 /content/common | |
parent | 915679f57bee15233874af080d8bf30394988dbe (diff) | |
download | chromium_src-83d8632524a4540f96abfe2fd86a3eaae35e2191.zip chromium_src-83d8632524a4540f96abfe2fd86a3eaae35e2191.tar.gz chromium_src-83d8632524a4540f96abfe2fd86a3eaae35e2191.tar.bz2 |
Do not put off destroying of the IOSurface in the GPU process.
Evicting old graphics contexts will be done in the GPU process by removing
routes from GpuChannel::router_. Doing so on a mac results in an assert when
handling GpuCommandBufferMsg_SetWindowSize. The assert was a consequence of how
we deal with closed windows. When a window is closed, the browser process sends
a message to the GPU process to request that the surface is removed. Rather
than doing that immediately, GpuThread object stores the view id of the renderer
in destroyed_renderer_routes_. GpuCommandBufferStub::OnFlush always checks if
its view id is in that set, and if is, it asks the GPUProcessor to destroy its
surface.
This change gets rid of the destroyed_renderer_routes_. Rather than deferring
the request to destroy the surface, we ask the GPU process to remove the route
which, in turn, will remove the GpuCommandBufferStub, GPUProcessor and its
surface.
See also bug 67170.
BUG=none
TEST=set the breakpoint in GpuChannel::OnMessageReceived, manually remove the route from router_ and stubs_. No assert should be triggered and context should be silently recovered.
Review URL: http://codereview.chromium.org/6688026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78777 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
-rw-r--r-- | content/common/gpu_messages.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/content/common/gpu_messages.h b/content/common/gpu_messages.h index a5731c8..396fe39e 100644 --- a/content/common/gpu_messages.h +++ b/content/common/gpu_messages.h @@ -163,12 +163,12 @@ IPC_MESSAGE_CONTROL3(GpuMsg_AcceleratedSurfaceBuffersSwappedACK, int32 /* route_id */, uint64 /* swap_buffers_count */) -// Tells the GPU process that the IOSurface of the buffer belonging to -// |renderer_route_id| a given id was destroyed, either by the user closing the -// tab hosting the surface, or by the renderer navigating to a new page. -IPC_MESSAGE_CONTROL2(GpuMsg_DidDestroyAcceleratedSurface, +// Requests the GPU process to destroy the command buffer and remove the +// associated route. Further messages to this command buffer will result in a +// channel error. +IPC_MESSAGE_CONTROL2(GpuMsg_DestroyCommandBuffer, int /* renderer_id */, - int32 /* renderer_route_id */) + int32 /* render_view_id */) #endif // Tells the GPU process to crash. |