diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-20 01:11:51 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-20 01:11:51 +0000 |
commit | 1d4ea84edf96367e3e8d7278f8e1b9f913f290b0 (patch) | |
tree | 068ccc98005de448c2fe3135e33e8dc268758705 /gpu/command_buffer/build_gles2_cmd_buffer.py | |
parent | 7dea88fd2340d36442020166c1aec0be431607e1 (diff) | |
download | chromium_src-1d4ea84edf96367e3e8d7278f8e1b9f913f290b0.zip chromium_src-1d4ea84edf96367e3e8d7278f8e1b9f913f290b0.tar.gz chromium_src-1d4ea84edf96367e3e8d7278f8e1b9f913f290b0.tar.bz2 |
Revert 93066 - 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
TBR=apatrick@chromium.org
Review URL: http://codereview.chromium.org/7458010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93143 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/build_gles2_cmd_buffer.py')
-rwxr-xr-x | gpu/command_buffer/build_gles2_cmd_buffer.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py index 76f3c59..02cac97 100755 --- a/gpu/command_buffer/build_gles2_cmd_buffer.py +++ b/gpu/command_buffer/build_gles2_cmd_buffer.py @@ -217,6 +217,8 @@ GL_APICALL void GL_APIENTRY glCopyTextureToParentTextureCHROMIUM (GLidBi GL_APICALL void GL_APIENTRY glResizeCHROMIUM (GLuint width, GLuint height); GL_APICALL const GLchar* GL_APIENTRY glGetRequestableExtensionsCHROMIUM (void); GL_APICALL void GL_APIENTRY glRequestExtensionCHROMIUM (const char* extension); +GL_APICALL void GL_APIENTRY glSetLatchCHROMIUM (GLuint latch_id); +GL_APICALL void GL_APIENTRY glWaitLatchCHROMIUM (GLuint latch_id); GL_APICALL void GL_APIENTRY glRateLimitOffscreenContextCHROMIUM (void); GL_APICALL void GL_APIENTRY glSetSurfaceCHROMIUM (GLint surface_id); GL_APICALL void GL_APIENTRY glGetMultipleIntegervCHROMIUM (const GLenum* pnames, GLuint count, GLint* results, GLsizeiptr size); @@ -424,6 +426,8 @@ _CMD_ID_TABLE = { 'ResizeCHROMIUM': 448, 'GetRequestableExtensionsCHROMIUM': 449, 'RequestExtensionCHROMIUM': 450, + 'SetLatchCHROMIUM': 451, + 'WaitLatchCHROMIUM': 452, 'SetSurfaceCHROMIUM': 453, 'GetMultipleIntegervCHROMIUM': 454, 'GetProgramInfoCHROMIUM': 455, @@ -1733,6 +1737,12 @@ _FUNCTION_INFO = { 'extension': True, 'chromium': True, }, + 'SetLatchCHROMIUM': { + 'type': 'Custom', + }, + 'WaitLatchCHROMIUM': { + 'type': 'Custom', + }, 'RateLimitOffscreenContextCHROMIUM': { 'gen_cmd': False, 'extension': True, |