Title: [183224] trunk/Source
Revision
183224
Author
[email protected]
Date
2015-04-23 15:54:02 -0700 (Thu, 23 Apr 2015)

Log Message

Changing TiledBacking velocity should schedule a tile revalidation
https://bugs.webkit.org/show_bug.cgi?id=144123

Reviewed by Tim Horton.
Source/WebCore:

Changing the velocity parameters on the TileController affect the computed
coverage rect, so whenever we make a change to velocity data that could
affect the outcome (basically any non-zero old or new velocities),
schedule a layer flush.

* platform/graphics/TiledBacking.h:
(WebCore::VelocityData::velocityOrScaleIsChanging):
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::setVelocity):

Source/WebKit2:

Drive-by fix: use the FrameView& that we have already.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (183223 => 183224)


--- trunk/Source/WebCore/ChangeLog	2015-04-23 22:52:37 UTC (rev 183223)
+++ trunk/Source/WebCore/ChangeLog	2015-04-23 22:54:02 UTC (rev 183224)
@@ -1,3 +1,20 @@
+2015-04-23  Simon Fraser  <[email protected]>
+
+        Changing TiledBacking velocity should schedule a tile revalidation
+        https://bugs.webkit.org/show_bug.cgi?id=144123
+
+        Reviewed by Tim Horton.
+
+        Changing the velocity parameters on the TileController affect the computed
+        coverage rect, so whenever we make a change to velocity data that could
+        affect the outcome (basically any non-zero old or new velocities),
+        schedule a layer flush.
+
+        * platform/graphics/TiledBacking.h:
+        (WebCore::VelocityData::velocityOrScaleIsChanging):
+        * platform/graphics/ca/TileController.cpp:
+        (WebCore::TileController::setVelocity):
+
 2015-04-23  Jer Noble  <[email protected]>
 
         [Mac] Disable QTKit by default on future OS X.

Modified: trunk/Source/WebCore/platform/graphics/TiledBacking.h (183223 => 183224)


--- trunk/Source/WebCore/platform/graphics/TiledBacking.h	2015-04-23 22:52:37 UTC (rev 183223)
+++ trunk/Source/WebCore/platform/graphics/TiledBacking.h	2015-04-23 22:54:02 UTC (rev 183224)
@@ -53,6 +53,11 @@
         , lastUpdateTime(updateTime)
     {
     }
+    
+    bool velocityOrScaleIsChanging() const
+    {
+        return horizontalVelocity || verticalVelocity || scaleChangeRate;
+    }
 };
 
 class TiledBacking {

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


--- trunk/Source/WebCore/platform/graphics/ca/TileController.cpp	2015-04-23 22:52:37 UTC (rev 183223)
+++ trunk/Source/WebCore/platform/graphics/ca/TileController.cpp	2015-04-23 22:54:02 UTC (rev 183224)
@@ -201,7 +201,11 @@
 
 void TileController::setVelocity(const VelocityData& velocity)
 {
+    bool changeAffectsTileCoverage = m_velocity.velocityOrScaleIsChanging() || velocity.velocityOrScaleIsChanging();
     m_velocity = velocity;
+    
+    if (changeAffectsTileCoverage)
+        setNeedsRevalidateTiles();
 }
 
 void TileController::setTopContentInset(float topContentInset)

Modified: trunk/Source/WebKit2/ChangeLog (183223 => 183224)


--- trunk/Source/WebKit2/ChangeLog	2015-04-23 22:52:37 UTC (rev 183223)
+++ trunk/Source/WebKit2/ChangeLog	2015-04-23 22:54:02 UTC (rev 183224)
@@ -1,3 +1,15 @@
+2015-04-23  Simon Fraser  <[email protected]>
+
+        Changing TiledBacking velocity should schedule a tile revalidation
+        https://bugs.webkit.org/show_bug.cgi?id=144123
+
+        Reviewed by Tim Horton.
+        
+        Drive-by fix: use the FrameView& that we have already.
+
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::updateVisibleContentRects):
+
 2015-04-23  Jer Noble  <[email protected]>
 
         [Mac] Disable QTKit by default on future OS X.

Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (183223 => 183224)


--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm	2015-04-23 22:52:37 UTC (rev 183223)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm	2015-04-23 22:54:02 UTC (rev 183224)
@@ -2786,7 +2786,7 @@
     frameView.setScrollVelocity(horizontalVelocity, verticalVelocity, scaleChangeRate, visibleContentRectUpdateInfo.timestamp());
 
     if (m_isInStableState)
-        m_page->mainFrame().view()->setCustomFixedPositionLayoutRect(enclosingIntRect(visibleContentRectUpdateInfo.customFixedPositionRect()));
+        frameView.setCustomFixedPositionLayoutRect(enclosingIntRect(visibleContentRectUpdateInfo.customFixedPositionRect()));
 
     if (!visibleContentRectUpdateInfo.isChangingObscuredInsetsInteractively())
         frameView.setCustomSizeForResizeEvent(expandedIntSize(visibleContentRectUpdateInfo.unobscuredRectInScrollViewCoordinates().size()));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to