aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl
diff options
context:
space:
mode:
authorGravatar djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-21 13:52:13 +0000
committerGravatar djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-21 13:52:13 +0000
commit4d9fde855c1e6479b3b2dec95fb4dbbce0e62eb9 (patch)
tree07a33dc436c49647219bc568aaa3af2b03ffbc7e /src/gpu/gl
parentf0ea77a3630e6d1c01d83aa5430b3780da9e88b6 (diff)
Add EXT suffix to EXT_map_buffer_range references
This rearranges the code to use the non-suffixed entry point for ES 3.x contexts, and the suffixed entry point on ES 2.0 contexts that have the extension. R=robertphillips@google.com Review URL: https://codereview.chromium.org/293993010 git-svn-id: http://skia.googlecode.com/svn/trunk@14823 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/gl')
-rw-r--r--src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp b/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp
index 312299adae..85341ac6eb 100644
--- a/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp
+++ b/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp
@@ -193,15 +193,23 @@ static GrGLInterface* create_es_interface(GrGLVersion version,
#endif
-#if GL_ES_VERSION_3_0 || GL_EXT_map_buffer_range
- functions->fMapBufferRange = glMapBufferRange;
- functions->fFlushMappedBufferRange = glFlushMappedBufferRange;
+ if (version >= GR_GL_VER(3,0)) {
+#if GL_ES_VERSION_3_0
+ functions->fMapBufferRange = glMapBufferRange;
+ functions->fFlushMappedBufferRange = glFlushMappedBufferRange;
#else
- if (version >= GR_GL_VER(3,0) || extensions->has("GL_EXT_map_buffer_range")) {
functions->fMapBufferRange = (GrGLMapBufferRangeProc) eglGetProcAddress("glMapBufferRange");
functions->fFlushMappedBufferRange = (GrGLFlushMappedBufferRangeProc) eglGetProcAddress("glFlushMappedBufferRange");
- }
#endif
+ } else if (extensions->has("GL_EXT_map_buffer_range")) {
+#if GL_EXT_map_buffer_range
+ functions->fMapBufferRange = glMapBufferRangeEXT;
+ functions->fFlushMappedBufferRange = glFlushMappedBufferRangeEXT;
+#else
+ functions->fMapBufferRange = (GrGLMapBufferRangeProc) eglGetProcAddress("glMapBufferRangeEXT");
+ functions->fFlushMappedBufferRange = (GrGLFlushMappedBufferRangeProc) eglGetProcAddress("glFlushMappedBufferRangeEXT");
+#endif
+ }
if (extensions->has("GL_EXT_debug_marker")) {
functions->fInsertEventMarker = (GrGLInsertEventMarkerProc) eglGetProcAddress("glInsertEventMarker");