summaryrefslogtreecommitdiffstats
path: root/ui/gl
diff options
context:
space:
mode:
authorsievers@chromium.org <sievers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-27 02:50:33 +0000
committersievers@chromium.org <sievers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-27 02:50:33 +0000
commite585f9e2bbac1ee6d93c4a57c55e94fd4af8faa4 (patch)
tree9b0d5118dae1e54723eed3fb9ad7839cbefc49b2 /ui/gl
parente1622c230f1121d79c627c7e160bc288810600cb (diff)
downloadchromium_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-xui/gl/generate_bindings.py7
-rw-r--r--ui/gl/gl_fence.cc3
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);
}