Bug 1427668 - Disable MakeCurrent TLS for ANGLE for now. - r=daoshengmu draft
authorJeff Gilbert <jgilbert@mozilla.com>
Thu, 21 Dec 2017 19:19:03 -0800
changeset 716063 fae6c5ee92039a98470552979d4b7f00f1802864
parent 716062 ad2b61c9f1bd24a7f6f333452c2638680d3c2ec2
child 716064 d7443e50c66b1530d9d6997b9c4b75fee10187a2
push id94316
push userbmo:jgilbert@mozilla.com
push dateFri, 05 Jan 2018 03:14:09 +0000
reviewersdaoshengmu
bugs1427668
milestone59.0a1
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)