summaryrefslogtreecommitdiff
path: root/firefox-wayland-cache-missing.patch
diff options
context:
space:
mode:
authorMartin Stransky <stransky@redhat.com>2019-09-19 15:14:15 +0200
committerMartin Stransky <stransky@redhat.com>2019-09-19 15:14:15 +0200
commitb697fe555bdf7ac7a777b0997353e5151ca995a7 (patch)
tree0103f05944074c2f688b75d82db3642a09c94cca /firefox-wayland-cache-missing.patch
parentDo PGO builds with X11 backend. (diff)
downloadlibrewolf-fedora-ff-b697fe555bdf7ac7a777b0997353e5151ca995a7.tar.gz
librewolf-fedora-ff-b697fe555bdf7ac7a777b0997353e5151ca995a7.tar.bz2
librewolf-fedora-ff-b697fe555bdf7ac7a777b0997353e5151ca995a7.zip
Updated cache-missing strategy for Wayland image cache.
Diffstat (limited to 'firefox-wayland-cache-missing.patch')
-rw-r--r--firefox-wayland-cache-missing.patch21
1 files changed, 21 insertions, 0 deletions
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<gfx::DrawTarget> 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"));
bgstack15