Title: [181813] trunk/Source/WebCore
Revision
181813
Author
[email protected]
Date
2015-03-20 14:32:28 -0700 (Fri, 20 Mar 2015)

Log Message

Log the slow-scrolling reasons (if any) on first commit of a ScrollingTreeFrameScrollingNodeMac
https://bugs.webkit.org/show_bug.cgi?id=142917

Reviewed by Beth Dakin.

The scrollperf test would fail to detect transitions between slow and fast scrolling
for new pages, because there was no logging when slow-scrolling scrolling tree was
torn down, and a new fast-scrolling tree constructed.

Fix by always logging the slow-scrolling reasons in the first update of the
ScrollingTreeFrameScrollingNodeMac, even when the slow-scrolling reasons haven't
changed.

* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):
(WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (181812 => 181813)


--- trunk/Source/WebCore/ChangeLog	2015-03-20 21:23:21 UTC (rev 181812)
+++ trunk/Source/WebCore/ChangeLog	2015-03-20 21:32:28 UTC (rev 181813)
@@ -1,3 +1,23 @@
+2015-03-20  Simon Fraser  <[email protected]>
+
+        Log the slow-scrolling reasons (if any) on first commit of a ScrollingTreeFrameScrollingNodeMac
+        https://bugs.webkit.org/show_bug.cgi?id=142917
+
+        Reviewed by Beth Dakin.
+        
+        The scrollperf test would fail to detect transitions between slow and fast scrolling
+        for new pages, because there was no logging when slow-scrolling scrolling tree was
+        torn down, and a new fast-scrolling tree constructed.
+        
+        Fix by always logging the slow-scrolling reasons in the first update of the
+        ScrollingTreeFrameScrollingNodeMac, even when the slow-scrolling reasons haven't
+        changed.
+
+        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
+        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
+        (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):
+        (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):
+
 2015-03-19  Geoffrey Garen  <[email protected]>
 
         Function.prototype.toString should not decompile the AST

Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h (181812 => 181813)


--- trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h	2015-03-20 21:23:21 UTC (rev 181812)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h	2015-03-20 21:32:28 UTC (rev 181813)
@@ -100,6 +100,7 @@
     RetainPtr<ScrollbarPainter> m_horizontalScrollbarPainter;
     FloatPoint m_probableMainThreadScrollPosition;
     bool m_lastScrollHadUnfilledPixels;
+    bool m_hadFirstUpdate;
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm (181812 => 181813)


--- trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm	2015-03-20 21:23:21 UTC (rev 181812)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm	2015-03-20 21:32:28 UTC (rev 181813)
@@ -61,6 +61,7 @@
     , m_verticalScrollbarPainter(0)
     , m_horizontalScrollbarPainter(0)
     , m_lastScrollHadUnfilledPixels(false)
+    , m_hadFirstUpdate(false)
 {
 }
 
@@ -111,6 +112,7 @@
         m_horizontalScrollbarPainter = scrollingStateNode.horizontalScrollbarPainter();
     }
 
+    bool logScrollingMode = !m_hadFirstUpdate;
     if (scrollingStateNode.hasChangedProperty(ScrollingStateFrameScrollingNode::ReasonsForSynchronousScrolling)) {
         if (shouldUpdateScrollLayerPositionSynchronously()) {
             // We're transitioning to the slow "update scroll layer position on the main thread" mode.
@@ -123,6 +125,10 @@
             }
         }
 
+        logScrollingMode = true;
+    }
+
+    if (logScrollingMode) {
         if (scrollingTree().scrollingPerformanceLoggingEnabled())
             logThreadedScrollingMode(synchronousScrollingReasons());
     }
@@ -139,6 +145,8 @@
     if (scrollingStateNode.hasChangedProperty(ScrollingStateFrameScrollingNode::VerticalSnapOffsets))
         m_scrollController.updateScrollSnapPoints(ScrollEventAxis::Vertical, convertToLayoutUnits(scrollingStateNode.verticalSnapOffsets()));
 #endif
+
+    m_hadFirstUpdate = true;
 }
 
 void ScrollingTreeFrameScrollingNodeMac::updateAfterChildren(const ScrollingStateNode& stateNode)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to