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

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

Issue 211633002: Fix bug on android with GL_EXT_debug_marker (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Nit Created 6 years, 9 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 b0d8eee30687f91c4c1c77bb0858ba59a91c7dd7..984d318a2185c3bee7330c636e76fa0f5609e00b 100644
--- a/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp
+++ b/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp
@@ -18,7 +18,7 @@
#include <EGL/egl.h>
static GrGLInterface* create_es_interface(GrGLVersion version,
- const GrGLExtensions& extensions) {
+ GrGLExtensions* extensions) {
if (version < GR_GL_VER(2,0)) {
return NULL;
}
@@ -159,7 +159,7 @@ static GrGLInterface* create_es_interface(GrGLVersion version,
#endif
}
- if (extensions.has("GL_EXT_multisampled_render_to_texture")) {
+ if (extensions->has("GL_EXT_multisampled_render_to_texture")) {
#if GL_EXT_multisampled_render_to_texture
functions->fFramebufferTexture2DMultisample = glFramebufferTexture2DMultisampleEXT;
functions->fRenderbufferStorageMultisampleES2EXT = glRenderbufferStorageMultisampleEXT;
@@ -167,7 +167,7 @@ static GrGLInterface* create_es_interface(GrGLVersion version,
functions->fFramebufferTexture2DMultisample = (GrGLFramebufferTexture2DMultisampleProc) eglGetProcAddress("glFramebufferTexture2DMultisampleEXT");
functions->fRenderbufferStorageMultisampleES2EXT = (GrGLRenderbufferStorageMultisampleProc) eglGetProcAddress("glRenderbufferStorageMultisampleEXT");
#endif
- } else if (extensions.has("GL_IMG_multisampled_render_to_texture")) {
+ } else if (extensions->has("GL_IMG_multisampled_render_to_texture")) {
#if GL_IMG_multisampled_render_to_texture
functions->fFramebufferTexture2DMultisample = glFramebufferTexture2DMultisampleIMG;
functions->fRenderbufferStorageMultisampleES2EXT = glRenderbufferStorageMultisampleIMG;
@@ -190,10 +190,17 @@ static GrGLInterface* create_es_interface(GrGLVersion version,
functions->fUnmapBuffer = (GrGLUnmapBufferProc) eglGetProcAddress("glUnmapBufferOES");
#endif
- if (extensions.has("GL_EXT_debug_marker")) {
- functions->fInsertEventMarker = (GrGLInsertEventMarkerProc) eglGetProcAddress("glInsertEventMarkerEXT");
- functions->fPushGroupMarker = (GrGLInsertEventMarkerProc) eglGetProcAddress("glPushGroupMarkerEXT");
- functions->fPopGroupMarker = (GrGLPopGroupMarkerProc) eglGetProcAddress("glPopGroupMarkerEXT");
+ if (extensions->has("GL_EXT_debug_marker")) {
+ functions->fInsertEventMarker = (GrGLInsertEventMarkerProc) eglGetProcAddress("glInsertEventMarker");
+ functions->fPushGroupMarker = (GrGLInsertEventMarkerProc) eglGetProcAddress("glPushGroupMarker");
+ functions->fPopGroupMarker = (GrGLPopGroupMarkerProc) eglGetProcAddress("glPopGroupMarker");
+ // The below check is here because a device has been found that has the extension string but
+ // returns NULL from the eglGetProcAddress for the functions
+ if (NULL == functions->fInsertEventMarker ||
+ NULL == functions->fPushGroupMarker ||
+ NULL == functions->fPopGroupMarker) {
+ extensions->remove("GL_EXT_debug_marker");
+ }
}
return interface;
@@ -414,7 +421,7 @@ const GrGLInterface* GrGLCreateNativeInterface() {
GrGLInterface* interface = NULL;
if (kGLES_GrGLStandard == standard) {
- interface = create_es_interface(version, extensions);
+ interface = create_es_interface(version, &extensions);
} else if (kGL_GrGLStandard == standard) {
interface = create_desktop_interface(version, extensions);
}
« 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