Added fix fox mozbz#1744896 (VSync)

This commit is contained in:
Martin Stransky 2021-12-23 11:57:55 +01:00
parent caf7474858
commit 951280922d
2 changed files with 48 additions and 1 deletions

View File

@ -163,7 +163,7 @@ ExcludeArch: aarch64
Summary: Mozilla Firefox Web browser
Name: firefox
Version: 95.0.2
Release: 3%{?pre_tag}%{?dist}
Release: 4%{?pre_tag}%{?dist}
URL: https://www.mozilla.org/firefox/
License: MPLv1.1 or GPLv2+ or LGPLv2+
Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz
@ -245,6 +245,7 @@ Patch407: mozilla-1667096.patch
Patch408: mozilla-1663844.patch
Patch415: mozilla-1670333.patch
Patch420: mochitest-wayland-workaround.patch
Patch421: mozilla-1744896.patch
# PGO/LTO patches
Patch600: pgo.patch
@ -487,6 +488,7 @@ This package contains results of tests executed during build.
%patch408 -p1 -b .1663844
%patch415 -p1 -b .1670333
#%patch420 -p1 -b .mochitest-wayland-workaround
%patch421 -p1 -b .1744896
# PGO patches
%if %{build_with_pgo}
@ -1056,6 +1058,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
#---------------------------------------------------------------------
%changelog
* Thu Dec 23 2021 Martin Stransky <stransky@redhat.com> - 95.0.2-4
- Added fix fox mozbz#1744896 (VSync)
* Wed Dec 22 2021 Martin Stransky <stransky@redhat.com> - 95.0.2-3
- Added Fedora 36 build fix (mzbz#1745560)

42
mozilla-1744896.patch Normal file
View File

@ -0,0 +1,42 @@
diff -up firefox-95.0.2/widget/gtk/nsWindow.cpp.1744896 firefox-95.0.2/widget/gtk/nsWindow.cpp
--- firefox-95.0.2/widget/gtk/nsWindow.cpp.1744896 2021-12-23 11:54:31.522539340 +0100
+++ firefox-95.0.2/widget/gtk/nsWindow.cpp 2021-12-23 11:55:56.070270174 +0100
@@ -5765,6 +5765,17 @@ nsresult nsWindow::Create(nsIWidget* aPa
}
}
#endif
+#ifdef MOZ_WAYLAND
+ // Initialize the window specific VsyncSource early in order to avoid races
+ // with BrowserParent::UpdateVsyncParentVsyncSource().
+ // Only use for toplevel windows for now, see bug 1619246.
+ if (GdkIsWaylandDisplay() &&
+ StaticPrefs::widget_wayland_vsync_enabled_AtStartup() &&
+ mWindowType == eWindowType_toplevel) {
+ mWaylandVsyncSource = new WaylandVsyncSource();
+ MOZ_RELEASE_ASSERT(mWaylandVsyncSource);
+ }
+#endif
// We create input contexts for all containers, except for
// toplevel popup windows
@@ -6077,19 +6088,12 @@ void nsWindow::ResumeCompositorFromCompo
void nsWindow::WaylandStartVsync() {
#ifdef MOZ_WAYLAND
- // only use for toplevel windows for now - see bug 1619246
- if (!GdkIsWaylandDisplay() ||
- !StaticPrefs::widget_wayland_vsync_enabled_AtStartup() ||
- mWindowType != eWindowType_toplevel) {
+ if (!mWaylandVsyncSource) {
return;
}
LOG("nsWindow::WaylandStartVsync() [%p]\n", (void*)this);
- if (!mWaylandVsyncSource) {
- mWaylandVsyncSource = new WaylandVsyncSource();
- }
-
WaylandVsyncSource::WaylandDisplay& display =
static_cast<WaylandVsyncSource::WaylandDisplay&>(
mWaylandVsyncSource->GetGlobalDisplay());