From b697fe555bdf7ac7a777b0997353e5151ca995a7 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 19 Sep 2019 15:14:15 +0200 Subject: [PATCH] Updated cache-missing strategy for Wayland image cache. --- firefox-wayland-cache-missing.patch | 21 +++++++++++++++++++++ firefox.spec | 9 +++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 firefox-wayland-cache-missing.patch diff --git a/firefox-wayland-cache-missing.patch b/firefox-wayland-cache-missing.patch new file mode 100644 index 0000000..8d665b5 --- /dev/null +++ b/firefox-wayland-cache-missing.patch @@ -0,0 +1,21 @@ +diff -up firefox-69.0.1/widget/gtk/WindowSurfaceWayland.cpp.old firefox-69.0.1/widget/gtk/WindowSurfaceWayland.cpp +--- firefox-69.0.1/widget/gtk/WindowSurfaceWayland.cpp.old 2019-09-19 15:05:13.586437024 +0200 ++++ firefox-69.0.1/widget/gtk/WindowSurfaceWayland.cpp 2019-09-19 15:09:39.649079248 +0200 +@@ -836,8 +836,15 @@ already_AddRefed Window + mBufferScreenRect = lockedScreenRect; + } + +- mDrawToWaylandBufferDirectly = +- (windowRedraw || mRenderingCacheMode != CACHE_ALL); ++ if (mRenderingCacheMode == CACHE_ALL) { ++ mDrawToWaylandBufferDirectly = windowRedraw; ++ } else if (mRenderingCacheMode == CACHE_MISSING) { ++ mDrawToWaylandBufferDirectly = windowRedraw || ++ ((lockSize.width*3 > lockedScreenRect.width && ++ lockSize.height*3 > lockedScreenRect.height)); ++ } else { ++ mDrawToWaylandBufferDirectly = true; ++ } + + if (mDrawToWaylandBufferDirectly) { + LOGWAYLAND((" Direct drawing\n")); diff --git a/firefox.spec b/firefox.spec index 38fed32..abf3618 100644 --- a/firefox.spec +++ b/firefox.spec @@ -94,7 +94,7 @@ ExcludeArch: ppc64le Summary: Mozilla Firefox Web browser Name: firefox Version: 69.0.1 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?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 @@ -170,6 +170,7 @@ Patch586: mozilla-1579823.patch Patch587: mozilla-1580152.patch Patch588: mozilla-1581748.patch Patch589: mozilla-1577024.patch +Patch590: firefox-wayland-cache-missing.patch # PGO/LTO patches Patch600: pgo.patch @@ -395,6 +396,7 @@ This package contains results of tests executed during build. %patch587 -p1 -b .mozilla-1580152 %patch588 -p1 -b .mozilla-1581748 %patch589 -p1 -b .mozilla-1577024 +%patch590 -p1 -b .cache-missing # PGO patches %patch600 -p1 -b .pgo @@ -979,7 +981,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog -* Thu Sep 18 2019 Martin Stransky - 69.0.1-2 +* Thu Sep 19 2019 Martin Stransky - 69.0.1-3 +- Updated cache-missing strategy for Wayland image cache. + +* Thu Sep 19 2019 Martin Stransky - 69.0.1-2 - Do PGO builds with X11 backend. * Wed Sep 18 2019 Martin Stransky - 69.0.1-1