Title: [275892] trunk/Source

Diff

Modified: trunk/Source/WebCore/ChangeLog (275891 => 275892)


--- trunk/Source/WebCore/ChangeLog	2021-04-13 16:53:46 UTC (rev 275891)
+++ trunk/Source/WebCore/ChangeLog	2021-04-13 16:55:33 UTC (rev 275892)
@@ -1,3 +1,14 @@
+2021-04-13  Commit Queue  <[email protected]>
+
+        Unreviewed, reverting r275889.
+        https://bugs.webkit.org/show_bug.cgi?id=224488
+
+        Unintentional commit
+
+        Reverted changeset:
+
+        https://trac.webkit.org/changeset/275889
+
 2021-04-13  Sihui Liu  <[email protected]>
 
         Make WebIDBServer not block main thread during initialization

Modified: trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp (275891 => 275892)


--- trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp	2021-04-13 16:53:46 UTC (rev 275891)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp	2021-04-13 16:55:33 UTC (rev 275892)
@@ -422,8 +422,6 @@
     if (!m_rootNode)
         return;
 
-    LOG_WITH_STREAM(Scrolling, stream << "ScrollingTree::applyLayerPositionsInternal - main thread " << isMainThread());
-
     applyLayerPositionsRecursive(*m_rootNode);
 }
 

Modified: trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp (275891 => 275892)


--- trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp	2021-04-13 16:53:46 UTC (rev 275891)
+++ trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp	2021-04-13 16:55:33 UTC (rev 275892)
@@ -210,17 +210,11 @@
         return;
     }
 
+    LOG_WITH_STREAM(Scrolling, stream << "ThreadedScrollingTree::scrollingTreeNodeDidScroll " << node.scrollingNodeID() << " to " << scrollPosition << " triggering main thread rendering update");
+
     auto scrollUpdate = ScrollUpdate { node.scrollingNodeID(), scrollPosition, layoutViewportOrigin, scrollingLayerPositionAction };
     addPendingScrollUpdate(WTFMove(scrollUpdate));
 
-    if (m_hasScheduledNextRenderingUpdate) {
-        LOG_WITH_STREAM(Scrolling, stream << "ThreadedScrollingTree::scrollingTreeNodeDidScroll " << node.scrollingNodeID() << " to " << scrollPosition << " - rendering update already scheduled");
-        return;
-    }
-
-    LOG_WITH_STREAM(Scrolling, stream << "ThreadedScrollingTree::scrollingTreeNodeDidScroll " << node.scrollingNodeID() << " to " << scrollPosition << " bouncing to main thread");
-
-    m_hasScheduledNextRenderingUpdate = true;
     auto deferrer = WheelEventTestMonitorCompletionDeferrer { wheelEventTestMonitor(), reinterpret_cast<WheelEventTestMonitor::ScrollableAreaIdentifier>(node.scrollingNodeID()), WheelEventTestMonitor::ScrollingThreadSyncNeeded };
     RunLoop::main().dispatch([strongThis = makeRef(*this), deferrer = WTFMove(deferrer)] {
         if (auto* scrollingCoordinator = strongThis->m_scrollingCoordinator.get())
@@ -280,15 +274,8 @@
 {
     ASSERT(isMainThread());
 
-    {
-        LockHolder treeLocker(m_treeMutex);
-        m_hasScheduledNextRenderingUpdate = false;
-    }
-
-    if (!hasProcessedWheelEventsRecently()) {
-        LOG_WITH_STREAM(Scrolling, stream << "ThreadedScrollingTree::willStartRenderingUpdate - no recent events");
+    if (!hasProcessedWheelEventsRecently())
         return;
-    }
 
     tracePoint(ScrollingThreadRenderUpdateSyncStart);
 
@@ -384,8 +371,6 @@
 
     LockHolder treeLocker(m_treeMutex);
 
-    LOG_WITH_STREAM(Scrolling, stream << "ThreadedScrollingTree::displayDidRefreshOnScrollingThread - hasScheduledNextRenderingUpdate " << m_hasScheduledNextRenderingUpdate);
-
     if (m_state != SynchronizationState::Idle && canUpdateLayersOnScrollingThread())
         applyLayerPositionsInternal();
 
@@ -403,7 +388,7 @@
     }
 }
 
-void ThreadedScrollingTree::displayDidRefresh(PlatformDisplayID displayID, ShouldSyncWithMainThread)
+void ThreadedScrollingTree::displayDidRefresh(PlatformDisplayID displayID)
 {
     // We're on the EventDispatcher thread or in the ThreadedCompositor thread here.
 

Modified: trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.h (275891 => 275892)


--- trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.h	2021-04-13 16:53:46 UTC (rev 275891)
+++ trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.h	2021-04-13 16:55:33 UTC (rev 275892)
@@ -37,11 +37,6 @@
 
 class AsyncScrollingCoordinator;
 
-enum class ShouldSyncWithMainThread : bool {
-    No,
-    Yes
-};
-
 // The ThreadedScrollingTree class lives almost exclusively on the scrolling thread and manages the
 // hierarchy of scrollable regions on the page. It's also responsible for dispatching events
 // to the correct scrolling tree nodes or dispatching events back to the ScrollingCoordinator
@@ -60,7 +55,7 @@
 
     void invalidate() override;
 
-    WEBCORE_EXPORT void displayDidRefresh(PlatformDisplayID, ShouldSyncWithMainThread);
+    WEBCORE_EXPORT void displayDidRefresh(PlatformDisplayID);
 
     void willStartRenderingUpdate();
     void didCompleteRenderingUpdate();
@@ -119,7 +114,6 @@
 
     bool m_scrollAnimatorEnabled { false };
     bool m_hasNodesWithSynchronousScrollingReasons { false };
-    bool m_hasScheduledNextRenderingUpdate { false };
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/graphics/AnimationFrameRate.h (275891 => 275892)


--- trunk/Source/WebCore/platform/graphics/AnimationFrameRate.h	2021-04-13 16:53:46 UTC (rev 275891)
+++ trunk/Source/WebCore/platform/graphics/AnimationFrameRate.h	2021-04-13 16:55:33 UTC (rev 275892)
@@ -45,14 +45,14 @@
 };
 
 // Allow a little more than 60fps to make sure we can at least hit that frame rate.
-constexpr const Seconds FullSpeedAnimationInterval { 31_ms };
+constexpr const Seconds FullSpeedAnimationInterval { 15_ms };
 // Allow a little more than 30fps to make sure we can at least hit that frame rate.
-constexpr const Seconds HalfSpeedThrottlingAnimationInterval { 60_ms };
+constexpr const Seconds HalfSpeedThrottlingAnimationInterval { 30_ms };
 constexpr const Seconds AggressiveThrottlingAnimationInterval { 10_s };
 constexpr const int IntervalThrottlingFactor { 2 };
 
-constexpr const FramesPerSecond FullSpeedFramesPerSecond = 30;
-constexpr const FramesPerSecond HalfSpeedThrottlingFramesPerSecond = 15;
+constexpr const FramesPerSecond FullSpeedFramesPerSecond = 60;
+constexpr const FramesPerSecond HalfSpeedThrottlingFramesPerSecond = 30;
 
 WEBCORE_EXPORT FramesPerSecond framesPerSecondNearestFullSpeed(FramesPerSecond);
 

Modified: trunk/Source/WebKit/ChangeLog (275891 => 275892)


--- trunk/Source/WebKit/ChangeLog	2021-04-13 16:53:46 UTC (rev 275891)
+++ trunk/Source/WebKit/ChangeLog	2021-04-13 16:55:33 UTC (rev 275892)
@@ -1,3 +1,14 @@
+2021-04-13  Commit Queue  <[email protected]>
+
+        Unreviewed, reverting r275889.
+        https://bugs.webkit.org/show_bug.cgi?id=224488
+
+        Unintentional commit
+
+        Reverted changeset:
+
+        https://trac.webkit.org/changeset/275889
+
 2021-04-13  Sihui Liu  <[email protected]>
 
         Make WebIDBServer not block main thread during initialization

Modified: trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp (275891 => 275892)


--- trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp	2021-04-13 16:53:46 UTC (rev 275891)
+++ trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp	2021-04-13 16:55:33 UTC (rev 275892)
@@ -279,12 +279,12 @@
 }
 #endif
 
-void EventDispatcher::notifyScrollingTreesDisplayWasRefreshed(PlatformDisplayID displayID, bool shouldSyncWithMainThread)
+void EventDispatcher::notifyScrollingTreesDisplayWasRefreshed(PlatformDisplayID displayID)
 {
 #if ENABLE(SCROLLING_THREAD)
     LockHolder locker(m_scrollingTreesMutex);
     for (auto keyValuePair : m_scrollingTrees)
-        keyValuePair.value->displayDidRefresh(displayID, shouldSyncWithMainThread ? ShouldSyncWithMainThread::Yes : ShouldSyncWithMainThread::No);
+        keyValuePair.value->displayDidRefresh(displayID);
 #endif
 }
 
@@ -292,9 +292,8 @@
 void EventDispatcher::displayWasRefreshed(PlatformDisplayID displayID, const DisplayUpdate& displayUpdate, bool sendToMainThread)
 {
     ASSERT(!RunLoop::isMain());
-    notifyScrollingTreesDisplayWasRefreshed(displayID, sendToMainThread);
+    notifyScrollingTreesDisplayWasRefreshed(displayID);
 
-    // FIXME: We need ensure that the last update in a sequence always has "send to main thread".
     if (!sendToMainThread)
         return;
 

Modified: trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.h (275891 => 275892)


--- trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.h	2021-04-13 16:53:46 UTC (rev 275891)
+++ trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.h	2021-04-13 16:55:33 UTC (rev 275892)
@@ -74,7 +74,7 @@
 
     void initializeConnection(IPC::Connection*);
 
-    void notifyScrollingTreesDisplayWasRefreshed(WebCore::PlatformDisplayID, bool shouldSyncWithMainThread = true);
+    void notifyScrollingTreesDisplayWasRefreshed(WebCore::PlatformDisplayID);
 
 private:
     EventDispatcher();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to