summaryrefslogtreecommitdiffstats
path: root/gpu/gles2_conform_support
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-19 18:26:29 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-19 18:26:29 +0000
commit3bb078951654ca9161207ac6afd375210beaddbb (patch)
tree670fdd5b7ff121e0fce1afe2fd879f4811620e34 /gpu/gles2_conform_support
parent5b06972b052fae4c12675bf3ba984ed8500b620b (diff)
downloadchromium_src-3bb078951654ca9161207ac6afd375210beaddbb.zip
chromium_src-3bb078951654ca9161207ac6afd375210beaddbb.tar.gz
chromium_src-3bb078951654ca9161207ac6afd375210beaddbb.tar.bz2
Execute all GL commands up to the put offset reported by a each flush.This means glFlush is a barrier that prevents reordering of GL commands issued on different command buffers. I used it to replace latches for synchronizing the rendering of WebGL canvas and Pepper 3D with the accelerated compositor. The primary advantage is it is more robust than latches and there is no possibility of deadlock. It should also be possible for WebGL and Pepper 3D to use it whereas exposing SetLatch and WaitLatch would be dangerous.The calls to SetLatch and WaitLatch are still in webkit but they are no-ops. SetLatch and WaitLatch are completely removed elsewhere.I changed CommandBuffer::FlushSync to Finish to reflect the new semantics. Going forward, I will add a synchronous CommandBuffer::WaitForToken and WaitForAvailableEntries, which should eliminate the need to call Finish unless glFinish is called by the client. The Pepper interface is unchanged because I don't want to break binary compatibility.I fixed a bug where the last read token in CmdBufferHelper was stale after receiving a ReportState IPC. That was causing a redundant synchronous flush in the client side SwapBuffers throttling.I removed Yield because it does not make sense with the new semantics. There is no round robin scheduling.Tested with WebGL on Windows and Mac and checked that 72672 did not regress.
Review URL: http://codereview.chromium.org/7253052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93066 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/gles2_conform_support')
-rw-r--r--gpu/gles2_conform_support/egl/display.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/gpu/gles2_conform_support/egl/display.cc b/gpu/gles2_conform_support/egl/display.cc
index cfadf0f..29c6540 100644
--- a/gpu/gles2_conform_support/egl/display.cc
+++ b/gpu/gles2_conform_support/egl/display.cc
@@ -109,7 +109,9 @@ EGLSurface Display::CreateWindowSurface(EGLConfig config,
using gpu::GpuScheduler;
std::vector<int32> attribs;
scoped_ptr<GpuScheduler> gpu_scheduler(
- new GpuScheduler(command_buffer_.get(), NULL, NULL));
+ GpuScheduler::Create(command_buffer_.get(),
+ NULL,
+ NULL));
if (!gpu_scheduler->Initialize(
win, gfx::Size(), gpu::gles2::DisallowedExtensions(), NULL,
attribs, NULL))