summaryrefslogtreecommitdiff
path: root/firefox-wayland-cache-missing.patch
blob: 8d665b500ddb92c1fa4cceccfc2b73da520dddb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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