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

Unified Diff: chrome/renderer/command_buffer_proxy.cc

Issue 1914005: Call set_unblock(true) on async resize message to guarantee its... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/command_buffer_proxy.cc
===================================================================
--- chrome/renderer/command_buffer_proxy.cc (revision 46421)
+++ chrome/renderer/command_buffer_proxy.cc (working copy)
@@ -184,7 +184,21 @@
}
void CommandBufferProxy::ResizeOffscreenFrameBuffer(const gfx::Size& size) {
- Send(new GpuCommandBufferMsg_ResizeOffscreenFrameBuffer(route_id_, size));
+ IPC::Message* message =
+ new GpuCommandBufferMsg_ResizeOffscreenFrameBuffer(route_id_, size);
+ // We need to set the unblock flag on this message to guarantee the
+ // order in which it is processed in the GPU process. Ordinarily in
+ // certain situations, namely if a synchronous message is being
+ // processed, other synchronous messages may be processed before
+ // asynchronous messages. During some page reloads WebGL seems to
+ // send three messages (sync, async, sync) in rapid succession in
+ // that order, and the sync message (GpuCommandBufferMsg_Flush, on
+ // behalf of SwapBuffers) is sometimes processed before the async
+ // message (GpuCommandBufferMsg_ResizeOffscreenFrameBuffer). This
+ // causes the WebGL content to disappear because the back buffer is
+ // not correctly resized.
+ message->set_unblock(true);
+ Send(message);
}
#if defined(OS_MACOSX)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698