Bug 1427668 - Disable MakeCurrent TLS for ANGLE for now. - r=daoshengmu
authorJeff Gilbert <jgilbert@mozilla.com>
Thu, 21 Dec 2017 19:19:03 -0800
changeset 449845 1626b467a1275b77ceb51f27907091996f1274a4
parent 449844 e1edf80827aa769a8d179fe0cf0e3a411a38c392
child 449846 86488a02187a697b1b49870c93a474e82e7e1404
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdaoshengmu
bugs1427668
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1427668 - Disable MakeCurrent TLS for ANGLE for now. - r=daoshengmu MozReview-Commit-ID: HzKKivtXeHX
gfx/gl/GLContextProviderEGL.cpp
--- 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)