summaryrefslogtreecommitdiffstats
path: root/widget/gtk/WindowSurfaceProvider.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:42 +0000
commitda4c7e7ed675c3bf405668739c3012d140856109 (patch)
treecdd868dba063fecba609a1d819de271f0d51b23e /widget/gtk/WindowSurfaceProvider.h
parentAdding upstream version 125.0.3. (diff)
downloadfirefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz
firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'widget/gtk/WindowSurfaceProvider.h')
-rw-r--r--widget/gtk/WindowSurfaceProvider.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/widget/gtk/WindowSurfaceProvider.h b/widget/gtk/WindowSurfaceProvider.h
index 6aaf50e2da..44a0d78ec6 100644
--- a/widget/gtk/WindowSurfaceProvider.h
+++ b/widget/gtk/WindowSurfaceProvider.h
@@ -81,7 +81,7 @@ class WindowSurfaceProvider final {
*/
mozilla::Mutex mMutex MOZ_UNANNOTATED;
// WindowSurface needs to be re-created as underlying window was changed.
- mozilla::Atomic<bool> mWindowSurfaceValid;
+ bool mWindowSurfaceValid;
#ifdef MOZ_WAYLAND
RefPtr<nsWindow> mWidget;
// WindowSurfaceProvider is owned by GtkCompositorWidget so we don't need
@@ -91,7 +91,12 @@ class WindowSurfaceProvider final {
#ifdef MOZ_X11
bool mIsShaped;
int mXDepth;
- Window mXWindow;
+ // Make mXWindow atomic to allow it read from different threads
+ // and make tsan happy.
+ // We don't care much about actual mXWindow value (it may be valid XWindow or
+ // nullptr) because we invalidate mXWindow at compositor/renderer thread
+ // before it's release in unmap handler.
+ Atomic<Window, Relaxed> mXWindow;
Visual* mXVisual;
#endif
};