diff options
author | sievers@chromium.org <sievers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-27 02:50:33 +0000 |
---|---|---|
committer | sievers@chromium.org <sievers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-27 02:50:33 +0000 |
commit | e585f9e2bbac1ee6d93c4a57c55e94fd4af8faa4 (patch) | |
tree | 9b0d5118dae1e54723eed3fb9ad7839cbefc49b2 /ui/gl | |
parent | e1622c230f1121d79c627c7e160bc288810600cb (diff) | |
download | chromium_src-e585f9e2bbac1ee6d93c4a57c55e94fd4af8faa4.zip chromium_src-e585f9e2bbac1ee6d93c4a57c55e94fd4af8faa4.tar.gz chromium_src-e585f9e2bbac1ee6d93c4a57c55e94fd4af8faa4.tar.bz2 |
Support async readbacks on OpenGL ES 3.0 drivers
R=apatrick@chromium.org, hubbe@chromium.org
Review URL: https://codereview.chromium.org/22891024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219669 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gl')
-rwxr-xr-x | ui/gl/generate_bindings.py | 7 | ||||
-rw-r--r-- | ui/gl/gl_fence.cc | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/ui/gl/generate_bindings.py b/ui/gl/generate_bindings.py index 3b37a17..3e51dcb 100755 --- a/ui/gl/generate_bindings.py +++ b/ui/gl/generate_bindings.py @@ -432,6 +432,13 @@ GL_FUNCTIONS = [ { 'return_type': 'void*', 'names': ['glMapBuffer', 'glMapBufferOES'], 'arguments': 'GLenum target, GLenum access', }, +{ 'return_type': 'void*', + 'names': ['glMapBufferRange'], + 'arguments': + 'GLenum target, GLintptr offset, GLsizeiptr length, GLenum access', }, +{ 'return_type': 'void', + 'names': ['glFlushMappedBufferRange'], + 'arguments': 'GLenum target, GLintptr offset, GLsizeiptr length', }, { 'return_type': 'void', 'names': ['glPixelStorei'], 'arguments': 'GLenum pname, GLint param', }, diff --git a/ui/gl/gl_fence.cc b/ui/gl/gl_fence.cc index b9d9513..9b85300 100644 --- a/ui/gl/gl_fence.cc +++ b/ui/gl/gl_fence.cc @@ -80,6 +80,7 @@ class EGLFenceSync : public gfx::GLFence { EGLFenceSync() { display_ = eglGetCurrentDisplay(); sync_ = eglCreateSyncKHR(display_, EGL_SYNC_FENCE_KHR, NULL); + glFlush(); } virtual bool HasCompleted() OVERRIDE { @@ -90,7 +91,7 @@ class EGLFenceSync : public gfx::GLFence { } virtual void ClientWait() OVERRIDE { - EGLint flags = EGL_SYNC_FLUSH_COMMANDS_BIT_KHR; + EGLint flags = 0; EGLTimeKHR time = EGL_FOREVER_KHR; eglClientWaitSyncKHR(display_, sync_, flags, time); } |