Title: [272476] trunk/Source/WebKit
Revision
272476
Author
[email protected]
Date
2021-02-07 12:25:24 -0800 (Sun, 07 Feb 2021)

Log Message

[CoordinatedGraphics] The whole content is unnecessarily repainted by animations in non-AC mode pages
https://bugs.webkit.org/show_bug.cgi?id=221391

Reviewed by Carlos Garcia Campos.

When triggerRenderingUpdate was called back, it added the whole
view area into the dirty region to repaint in non-AC mode pages.
This caused a problem that the whole content was unnecessarily
repainted by animations in non-AC mode pages

If triggerRenderingUpdate is called back,
DrawingAreaCoordinatedGraphics::display should be called to ensure
WebPage::updateRendering() called even if m_dirtyRegion is empty.

* WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:
(WebKit::DrawingAreaCoordinatedGraphics::triggerRenderingUpdate):
Call scheduleDisplay() instead of setNeedsDisplay().
(WebKit::DrawingAreaCoordinatedGraphics::scheduleDisplay): Don't
return early even if m_dirtyRegion is empty.
(WebKit::DrawingAreaCoordinatedGraphics::display()): Ditto.
(WebKit::DrawingAreaCoordinatedGraphics::display(UpdateInfo&)):
Return early if m_dirtyRegion is empty.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (272475 => 272476)


--- trunk/Source/WebKit/ChangeLog	2021-02-07 19:27:35 UTC (rev 272475)
+++ trunk/Source/WebKit/ChangeLog	2021-02-07 20:25:24 UTC (rev 272476)
@@ -1,3 +1,28 @@
+2021-02-07  Fujii Hironori  <[email protected]>
+
+        [CoordinatedGraphics] The whole content is unnecessarily repainted by animations in non-AC mode pages
+        https://bugs.webkit.org/show_bug.cgi?id=221391
+
+        Reviewed by Carlos Garcia Campos.
+
+        When triggerRenderingUpdate was called back, it added the whole
+        view area into the dirty region to repaint in non-AC mode pages.
+        This caused a problem that the whole content was unnecessarily
+        repainted by animations in non-AC mode pages
+
+        If triggerRenderingUpdate is called back,
+        DrawingAreaCoordinatedGraphics::display should be called to ensure
+        WebPage::updateRendering() called even if m_dirtyRegion is empty.
+
+        * WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:
+        (WebKit::DrawingAreaCoordinatedGraphics::triggerRenderingUpdate):
+        Call scheduleDisplay() instead of setNeedsDisplay().
+        (WebKit::DrawingAreaCoordinatedGraphics::scheduleDisplay): Don't
+        return early even if m_dirtyRegion is empty.
+        (WebKit::DrawingAreaCoordinatedGraphics::display()): Ditto.
+        (WebKit::DrawingAreaCoordinatedGraphics::display(UpdateInfo&)):
+        Return early if m_dirtyRegion is empty.
+
 2021-02-07  Sam Weinig  <[email protected]>
 
         Differentiate between color spaces used to tag colors and color spaces used to tag destinations

Modified: trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp (272475 => 272476)


--- trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp	2021-02-07 19:27:35 UTC (rev 272475)
+++ trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp	2021-02-07 20:25:24 UTC (rev 272476)
@@ -356,7 +356,7 @@
     if (m_layerTreeHost)
         m_layerTreeHost->scheduleLayerFlush();
     else
-        setNeedsDisplay();
+        scheduleDisplay();
 }
 
 #if USE(COORDINATED_GRAPHICS)
@@ -682,9 +682,6 @@
     if (m_isPaintingSuspended)
         return;
 
-    if (m_dirtyRegion.isEmpty())
-        return;
-
     if (m_displayTimer.isActive())
         return;
 
@@ -708,9 +705,6 @@
     if (m_isPaintingSuspended)
         return;
 
-    if (m_dirtyRegion.isEmpty())
-        return;
-
     if (m_shouldSendDidUpdateBackingStoreState) {
         sendDidUpdateBackingStoreState();
         return;
@@ -765,6 +759,9 @@
     if (m_layerTreeHost)
         return;
 
+    if (m_dirtyRegion.isEmpty())
+        return;
+
     updateInfo.viewSize = m_webPage.size();
     updateInfo.deviceScaleFactor = m_webPage.corePage()->deviceScaleFactor();
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to