commit | aec570e2d72cbb861be18dddd1a472b93f3b87d0 | [log] [tgz] |
---|---|---|
author | mtklein <mtklein@chromium.org> | Fri Jul 22 08:35:27 2016 -0700 |
committer | Commit bot <commit-bot@chromium.org> | Fri Jul 22 08:35:27 2016 -0700 |
tree | 9aaecd78373bf0cb0ecf935c0b2715ca56c413b5 | |
parent | 1543487fc642b443283ace3fa37e6597cd89061f [diff] |
Don't ask GLX for EGL procs. Seems to fix my woes. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2168293003 Review-Url: https://codereview.chromium.org/2168293003
diff --git a/src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp b/src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp index e3d37bd..4a20412 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));