summaryrefslogtreecommitdiffstats
path: root/gfx/gl/GLLibraryEGL.h
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/gl/GLLibraryEGL.h')
-rw-r--r--gfx/gl/GLLibraryEGL.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/gfx/gl/GLLibraryEGL.h b/gfx/gl/GLLibraryEGL.h
index 28f84b27f4..0a853e67c9 100644
--- a/gfx/gl/GLLibraryEGL.h
+++ b/gfx/gl/GLLibraryEGL.h
@@ -11,7 +11,7 @@
#include "base/platform_thread.h" // for PlatformThreadId
#include "gfxEnv.h"
-#include "GLTypes.h"
+#include "GLContext.h"
#include "mozilla/EnumTypeTraits.h"
#include "mozilla/gfx/Logging.h"
#include "mozilla/Maybe.h"
@@ -264,7 +264,6 @@ class GLLibraryEGL final {
const bool CHECK_CONTEXT_OWNERSHIP = true;
if (CHECK_CONTEXT_OWNERSHIP) {
const MutexAutoLock lock(mMutex);
-
const auto tid = PlatformThread::CurrentId();
const auto prevCtx = fGetCurrentContext();
@@ -287,6 +286,11 @@ class GLLibraryEGL final {
}
}
+ // Always reset the TLS current context.
+ // If we're called by TLS-caching MakeCurrent, after we return true,
+ // the caller will set the TLS correctly anyway.
+ GLContext::ResetTLSCurrentContext();
+
WRAP(fMakeCurrent(dpy, draw, read, ctx));
}