Bug 1427668 - Disable MakeCurrent TLS for ANGLE for now. - r=daoshengmu
MozReview-Commit-ID: HzKKivtXeHX
--- a/gfx/gl/GLContextProviderEGL.cpp
+++ b/gfx/gl/GLContextProviderEGL.cpp
@@ -120,16 +120,17 @@ is_power_of_two(int v)
return true;
return (v & (v-1)) == 0;
}
static void
DestroySurface(EGLSurface oldSurface) {
if (oldSurface != EGL_NO_SURFACE) {
+ // TODO: This breaks TLS MakeCurrent caching.
sEGLLibrary.fMakeCurrent(EGL_DISPLAY(),
EGL_NO_SURFACE, EGL_NO_SURFACE,
EGL_NO_CONTEXT);
sEGLLibrary.fDestroySurface(EGL_DISPLAY(), oldSurface);
}
}
static EGLSurface
@@ -222,17 +223,17 @@ GLContextEGLFactory::Create(EGLNativeWin
sEGLLibrary.fSwapInterval(EGL_DISPLAY(), 0);
}
return gl.forget();
}
GLContextEGL::GLContextEGL(CreateContextFlags flags, const SurfaceCaps& caps,
bool isOffscreen, EGLConfig config, EGLSurface surface,
EGLContext context)
- : GLContext(flags, caps, nullptr, isOffscreen, sEGLLibrary.IsANGLE())
+ : GLContext(flags, caps, nullptr, isOffscreen, false)
, mConfig(config)
, mSurface(surface)
, mContext(context)
, mSurfaceOverride(EGL_NO_SURFACE)
, mThebesSurface(nullptr)
, mBound(false)
, mIsPBuffer(false)
, mIsDoubleBuffered(false)