Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(391)

Unified Diff: src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp

Issue 293993010: Add EXT suffix to EXT_map_buffer_range references (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp
diff --git a/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp b/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp
index 312299adaea599d20ef512e29c7bc3b32e0b5238..85341ac6ebc8e1dd7b95781b47ecd574246280ca 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");
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698