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

Unified Diff: src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp

Issue 2168293003: Don't ask GLX for EGL procs. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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/glx/GrGLCreateNativeInterface_glx.cpp
diff --git a/src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp b/src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp
index e3d37bd80f1efeeab81da681bab29797e4cd186c..4a204123e186ecd5cdadd714892cb3d8fe8af7b1 100644
--- a/src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp
+++ b/src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp
@@ -13,6 +13,12 @@
#include <GL/glx.h>
static GrGLFuncPtr glx_get(void* ctx, const char name[]) {
+ // Avoid calling glXGetProcAddress() for EGL procs.
+ // We don't expect it to ever succeed, but somtimes it returns non-null anyway.
+ if (0 == strncmp(name, "egl", 3)) {
+ return nullptr;
+ }
+
SkASSERT(nullptr == ctx);
SkASSERT(glXGetCurrentContext());
return glXGetProcAddress(reinterpret_cast<const GLubyte*>(name));
« 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