Title: [295269] trunk
Revision
295269
Author
timothy_hor...@apple.com
Date
2022-06-04 20:30:00 -0700 (Sat, 04 Jun 2022)

Log Message

Force Repaint menu item does not repaint compositing layers, only tiles
https://bugs.webkit.org/show_bug.cgi?id=241292

Reviewed by Simon Fraser.

* Source/WebCore/page/Page.h:
* Source/WebCore/page/Page.cpp:
(WebCore::Page::forceRepaintAllFrames):
Move forceRepaint to Page, and use `repaintViewAndCompositedLayers` instead of
`TiledBacking::forceRepaint`, so we hit all the compositing layers, not just the tiles.

* Source/WebCore/platform/graphics/TiledBacking.h:
* Source/WebCore/platform/graphics/ca/TileController.cpp:
(WebCore::TileController::forceRepaint): Deleted.
* Source/WebCore/platform/graphics/ca/TileController.h:
* Source/WebKit/WebProcess/WebPage/wc/GraphicsLayerWC.cpp:
Get rid of this unused method.

* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::forceRepaint):
* Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::forceRepaint):
Adopt `forceRepaintAllFrames`.

* LayoutTests/fast/images/async-image-multiple-clients-repaint-expected.txt:
* LayoutTests/platform/ios/fast/images/async-image-multiple-clients-repaint-expected.txt
* LayoutTests/platform/win/fast/images/async-image-multiple-clients-repaint-expected.txt
Rebaseline this test, except on Windows.

Canonical link: https://commits.webkit.org/251315@main

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/fast/images/async-image-multiple-clients-repaint-expected.txt (295268 => 295269)


--- trunk/LayoutTests/fast/images/async-image-multiple-clients-repaint-expected.txt	2022-06-04 20:59:23 UTC (rev 295268)
+++ trunk/LayoutTests/fast/images/async-image-multiple-clients-repaint-expected.txt	2022-06-05 03:30:00 UTC (rev 295269)
@@ -3,6 +3,8 @@
 (repaint rects
   (rect 8 344 200 100)
   (rect 8 344 200 100)
+  (rect 0 0 800 600)
+  (rect 0 0 800 600)
   (rect 8 344 200 100)
 )
 

Modified: trunk/LayoutTests/platform/ios/fast/images/async-image-multiple-clients-repaint-expected.txt (295268 => 295269)


--- trunk/LayoutTests/platform/ios/fast/images/async-image-multiple-clients-repaint-expected.txt	2022-06-04 20:59:23 UTC (rev 295268)
+++ trunk/LayoutTests/platform/ios/fast/images/async-image-multiple-clients-repaint-expected.txt	2022-06-05 03:30:00 UTC (rev 295269)
@@ -3,6 +3,8 @@
 (repaint rects
   (rect 8 348 200 100)
   (rect 8 348 200 100)
+  (rect 0 0 800 600)
+  (rect 0 0 800 600)
   (rect 8 348 200 100)
 )
 

Copied: trunk/LayoutTests/platform/win/fast/images/async-image-multiple-clients-repaint-expected.txt (from rev 295268, trunk/LayoutTests/fast/images/async-image-multiple-clients-repaint-expected.txt) (0 => 295269)


--- trunk/LayoutTests/platform/win/fast/images/async-image-multiple-clients-repaint-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/win/fast/images/async-image-multiple-clients-repaint-expected.txt	2022-06-05 03:30:00 UTC (rev 295269)
@@ -0,0 +1,8 @@
+
+
+(repaint rects
+  (rect 8 344 200 100)
+  (rect 8 344 200 100)
+  (rect 8 344 200 100)
+)
+

Modified: trunk/Source/WebCore/page/Page.cpp (295268 => 295269)


--- trunk/Source/WebCore/page/Page.cpp	2022-06-04 20:59:23 UTC (rev 295268)
+++ trunk/Source/WebCore/page/Page.cpp	2022-06-05 03:30:00 UTC (rev 295269)
@@ -3991,4 +3991,15 @@
     mainFrame().setDocument(WTFMove(document));
 }
 
+void Page::forceRepaintAllFrames()
+{
+    for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNext()) {
+        FrameView* frameView = frame->view();
+        if (!frameView || !frameView->renderView())
+            continue;
+
+        frameView->renderView()->repaintViewAndCompositedLayers();
+    }
+}
+
 } // namespace WebCore

Modified: trunk/Source/WebCore/page/Page.h (295268 => 295269)


--- trunk/Source/WebCore/page/Page.h	2022-06-04 20:59:23 UTC (rev 295268)
+++ trunk/Source/WebCore/page/Page.h	2022-06-05 03:30:00 UTC (rev 295269)
@@ -964,6 +964,8 @@
 
     ContentSecurityPolicyModeForExtension contentSecurityPolicyModeForExtension() const { return m_contentSecurityPolicyModeForExtension; }
 
+    WEBCORE_EXPORT void forceRepaintAllFrames();
+
 private:
     struct Navigation {
         RegistrableDomain domain;

Modified: trunk/Source/WebCore/platform/graphics/TiledBacking.h (295268 => 295269)


--- trunk/Source/WebCore/platform/graphics/TiledBacking.h	2022-06-04 20:59:23 UTC (rev 295268)
+++ trunk/Source/WebCore/platform/graphics/TiledBacking.h	2022-06-05 03:30:00 UTC (rev 295269)
@@ -104,7 +104,6 @@
     virtual IntSize tileSize() const = 0;
 
     virtual void revalidateTiles() = 0;
-    virtual void forceRepaint() = 0;
 
     virtual void setScrollingPerformanceTestingEnabled(bool) = 0;
     virtual bool scrollingPerformanceTestingEnabled() const = 0;

Modified: trunk/Source/WebCore/platform/graphics/ca/TileController.cpp (295268 => 295269)


--- trunk/Source/WebCore/platform/graphics/ca/TileController.cpp	2022-06-04 20:59:23 UTC (rev 295268)
+++ trunk/Source/WebCore/platform/graphics/ca/TileController.cpp	2022-06-05 03:30:00 UTC (rev 295269)
@@ -309,11 +309,6 @@
     tileGrid().revalidateTiles();
 }
 
-void TileController::forceRepaint()
-{
-    setNeedsDisplay();
-}
-
 void TileController::setTileDebugBorderWidth(float borderWidth)
 {
     if (m_tileDebugBorderWidth == borderWidth)

Modified: trunk/Source/WebCore/platform/graphics/ca/TileController.h (295268 => 295269)


--- trunk/Source/WebCore/platform/graphics/ca/TileController.h	2022-06-04 20:59:23 UTC (rev 295268)
+++ trunk/Source/WebCore/platform/graphics/ca/TileController.h	2022-06-05 03:30:00 UTC (rev 295269)
@@ -167,7 +167,6 @@
     bool isInWindow() const final { return m_isInWindow; }
     void setTileCoverage(TileCoverage) final;
     void revalidateTiles() final;
-    void forceRepaint() final;
     IntRect tileGridExtent() const final;
     void setScrollingPerformanceTestingEnabled(bool flag) final { m_scrollingPerformanceTestingEnabled = flag; }
     double retainedTileBackingStoreMemory() const final;

Modified: trunk/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm (295268 => 295269)


--- trunk/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm	2022-06-04 20:59:23 UTC (rev 295268)
+++ trunk/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm	2022-06-05 03:30:00 UTC (rev 295269)
@@ -210,14 +210,7 @@
     if (m_isRenderingSuspended)
         return;
 
-    for (Frame* frame = &m_webPage.corePage()->mainFrame(); frame; frame = frame->tree().traverseNext()) {
-        FrameView* frameView = frame->view();
-        if (!frameView || !frameView->tiledBacking())
-            continue;
-
-        frameView->tiledBacking()->forceRepaint();
-    }
-
+    m_webPage.corePage()->forceRepaintAllFrames();
     updateRendering();
 }
 

Modified: trunk/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (295268 => 295269)


--- trunk/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm	2022-06-04 20:59:23 UTC (rev 295268)
+++ trunk/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm	2022-06-05 03:30:00 UTC (rev 295269)
@@ -164,14 +164,7 @@
     if (m_layerTreeStateIsFrozen)
         return;
 
-    for (Frame* frame = &m_webPage.corePage()->mainFrame(); frame; frame = frame->tree().traverseNext()) {
-        FrameView* frameView = frame->view();
-        if (!frameView || !frameView->tiledBacking())
-            continue;
-
-        frameView->tiledBacking()->forceRepaint();
-    }
-
+    m_webPage.corePage()->forceRepaintAllFrames();
     updateRendering();
     [CATransaction flush];
     [CATransaction synchronize];

Modified: trunk/Source/WebKit/WebProcess/WebPage/wc/GraphicsLayerWC.cpp (295268 => 295269)


--- trunk/Source/WebKit/WebProcess/WebPage/wc/GraphicsLayerWC.cpp	2022-06-04 20:59:23 UTC (rev 295268)
+++ trunk/Source/WebKit/WebProcess/WebPage/wc/GraphicsLayerWC.cpp	2022-06-05 03:30:00 UTC (rev 295269)
@@ -109,7 +109,6 @@
     void didEndLiveResize() final { };
     IntSize tileSize() const final { return m_tileGrid.tilePixelSize(); }
     void revalidateTiles() final { }
-    void forceRepaint() final { }
     IntRect tileGridExtent() const final { return { }; }
     void setScrollingPerformanceTestingEnabled(bool flag) final { }
     bool scrollingPerformanceTestingEnabled() const final { return false; };
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to