Title: [144017] trunk/Source/WebKit/chromium
Revision
144017
Author
commit-qu...@webkit.org
Date
2013-02-26 00:34:53 -0800 (Tue, 26 Feb 2013)

Log Message

[chromium] Fix continuous painting mode
https://bugs.webkit.org/show_bug.cgi?id=110788

Patch by James Robinson <jam...@chromium.org> on 2013-02-26
Reviewed by Adrienne Walker.

Recent instrumentation shuffling caused WebViewImpl::didBeginFrame to no longer be called, which
broke continuous painting.  Since continuous painting mode is meant to simply invalidate layers
on each frame, it's a better fit for the animation system. This moves the invalidation calls
into WebViewImpl::updateAnimations along with other animation type things.

Tested manually by enabling continuous painting mode in the inspector. There aren't any automated
tests in WebKit for this feature.

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::setContinuousPaintingEnabled):
(WebKit::WebViewImpl::didBeginFrame):
(WebKit::WebViewImpl::updateAnimations):
* src/painting/ContinuousPainter.cpp:
(WebKit::ContinuousPainter::setNeedsDisplayRecursive):

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (144016 => 144017)


--- trunk/Source/WebKit/chromium/ChangeLog	2013-02-26 08:32:32 UTC (rev 144016)
+++ trunk/Source/WebKit/chromium/ChangeLog	2013-02-26 08:34:53 UTC (rev 144017)
@@ -1,3 +1,25 @@
+2013-02-26  James Robinson  <jam...@chromium.org>
+
+        [chromium] Fix continuous painting mode
+        https://bugs.webkit.org/show_bug.cgi?id=110788
+
+        Reviewed by Adrienne Walker.
+
+        Recent instrumentation shuffling caused WebViewImpl::didBeginFrame to no longer be called, which
+        broke continuous painting.  Since continuous painting mode is meant to simply invalidate layers
+        on each frame, it's a better fit for the animation system. This moves the invalidation calls
+        into WebViewImpl::updateAnimations along with other animation type things.
+
+        Tested manually by enabling continuous painting mode in the inspector. There aren't any automated
+        tests in WebKit for this feature.
+
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::setContinuousPaintingEnabled):
+        (WebKit::WebViewImpl::didBeginFrame):
+        (WebKit::WebViewImpl::updateAnimations):
+        * src/painting/ContinuousPainter.cpp:
+        (WebKit::ContinuousPainter::setNeedsDisplayRecursive):
+
 2013-02-26  James Weatherall  <w...@chromium.org>
 
         keydown and keyup events have zero keycode for some numeric pad keys under Chromium on Linux

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (144016 => 144017)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2013-02-26 08:32:32 UTC (rev 144016)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2013-02-26 08:34:53 UTC (rev 144017)
@@ -930,6 +930,7 @@
         m_layerTreeView->setContinuousPaintingEnabled(enabled);
     }
     m_continuousPaintingEnabled = enabled;
+    m_client->scheduleAnimation();
 }
 
 bool WebViewImpl::handleKeyEvent(const WebKeyboardEvent& event)
@@ -1852,9 +1853,6 @@
 {
     if (m_devToolsAgent)
         m_devToolsAgent->didComposite();
-
-    if (m_continuousPaintingEnabled)
-        ContinuousPainter::setNeedsDisplayRecursive(m_rootGraphicsLayer, m_pageOverlays.get());
 }
 
 void WebViewImpl::updateAnimations(double monotonicFrameBeginTime)
@@ -1876,6 +1874,11 @@
     if (!m_page)
         return;
 
+    if (m_continuousPaintingEnabled) {
+        ContinuousPainter::setNeedsDisplayRecursive(m_rootGraphicsLayer, m_pageOverlays.get());
+        m_client->scheduleAnimation();
+    }
+
     PageWidgetDelegate::animate(m_page.get(), monotonicFrameBeginTime);
 #endif
 }

Modified: trunk/Source/WebKit/chromium/src/painting/ContinuousPainter.cpp (144016 => 144017)


--- trunk/Source/WebKit/chromium/src/painting/ContinuousPainter.cpp	2013-02-26 08:32:32 UTC (rev 144016)
+++ trunk/Source/WebKit/chromium/src/painting/ContinuousPainter.cpp	2013-02-26 08:34:53 UTC (rev 144017)
@@ -31,6 +31,7 @@
 
 #include "GraphicsLayer.h"
 #include "PageOverlayList.h"
+#include "TraceEvent.h"
 
 using namespace WebCore;
 
@@ -44,6 +45,7 @@
     if (pageOverlays && pageOverlays->findGraphicsLayer(layer) != WTF::notFound)
         return;
 
+    TRACE_EVENT0("webkit", "ContinuousPainter::setNeedsDisplayRecursive");
     layer->setNeedsDisplay();
 
     setNeedsDisplayRecursive(layer->maskLayer(), pageOverlays);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to