summaryrefslogtreecommitdiffstats
path: root/gfx/gl/GLLibraryEGL.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 15:11:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 15:11:27 +0000
commitf3bcaf9f88aad2c423ebcd61121562f9834187d4 (patch)
treef22238c29b57707b645a350940e3e9bdf3ce1f5d /gfx/gl/GLLibraryEGL.h
parentAdding debian version 115.7.0esr-1~deb12u1. (diff)
downloadfirefox-esr-f3bcaf9f88aad2c423ebcd61121562f9834187d4.tar.xz
firefox-esr-f3bcaf9f88aad2c423ebcd61121562f9834187d4.zip
Merging upstream version 115.8.0esr.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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));
}