Changeset 275892 in webkit


Ignore:
Timestamp:
Apr 13, 2021, 9:55:33 AM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, reverting r275889.
https://bugs.webkit.org/show_bug.cgi?id=224488

Unintentional commit

Reverted changeset:

https://trac.webkit.org/changeset/275889

Location:
trunk/Source
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r275891 r275892  
     12021-04-13  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, reverting r275889.
     4        https://bugs.webkit.org/show_bug.cgi?id=224488
     5
     6        Unintentional commit
     7
     8        Reverted changeset:
     9
     10        https://trac.webkit.org/changeset/275889
     11
    1122021-04-13  Sihui Liu  <sihui_liu@apple.com>
    213
  • trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp

    r275889 r275892  
    423423        return;
    424424
    425     LOG_WITH_STREAM(Scrolling, stream << "ScrollingTree::applyLayerPositionsInternal - main thread " << isMainThread());
    426 
    427425    applyLayerPositionsRecursive(*m_rootNode);
    428426}
  • trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp

    r275889 r275892  
    211211    }
    212212
     213    LOG_WITH_STREAM(Scrolling, stream << "ThreadedScrollingTree::scrollingTreeNodeDidScroll " << node.scrollingNodeID() << " to " << scrollPosition << " triggering main thread rendering update");
     214
    213215    auto scrollUpdate = ScrollUpdate { node.scrollingNodeID(), scrollPosition, layoutViewportOrigin, scrollingLayerPositionAction };
    214216    addPendingScrollUpdate(WTFMove(scrollUpdate));
    215217
    216     if (m_hasScheduledNextRenderingUpdate) {
    217         LOG_WITH_STREAM(Scrolling, stream << "ThreadedScrollingTree::scrollingTreeNodeDidScroll " << node.scrollingNodeID() << " to " << scrollPosition << " - rendering update already scheduled");
    218         return;
    219     }
    220 
    221     LOG_WITH_STREAM(Scrolling, stream << "ThreadedScrollingTree::scrollingTreeNodeDidScroll " << node.scrollingNodeID() << " to " << scrollPosition << " bouncing to main thread");
    222 
    223     m_hasScheduledNextRenderingUpdate = true;
    224218    auto deferrer = WheelEventTestMonitorCompletionDeferrer { wheelEventTestMonitor(), reinterpret_cast<WheelEventTestMonitor::ScrollableAreaIdentifier>(node.scrollingNodeID()), WheelEventTestMonitor::ScrollingThreadSyncNeeded };
    225219    RunLoop::main().dispatch([strongThis = makeRef(*this), deferrer = WTFMove(deferrer)] {
     
    281275    ASSERT(isMainThread());
    282276
    283     {
    284         LockHolder treeLocker(m_treeMutex);
    285         m_hasScheduledNextRenderingUpdate = false;
    286     }
    287 
    288     if (!hasProcessedWheelEventsRecently()) {
    289         LOG_WITH_STREAM(Scrolling, stream << "ThreadedScrollingTree::willStartRenderingUpdate - no recent events");
    290         return;
    291     }
     277    if (!hasProcessedWheelEventsRecently())
     278        return;
    292279
    293280    tracePoint(ScrollingThreadRenderUpdateSyncStart);
     
    385372    LockHolder treeLocker(m_treeMutex);
    386373
    387     LOG_WITH_STREAM(Scrolling, stream << "ThreadedScrollingTree::displayDidRefreshOnScrollingThread - hasScheduledNextRenderingUpdate " << m_hasScheduledNextRenderingUpdate);
    388 
    389374    if (m_state != SynchronizationState::Idle && canUpdateLayersOnScrollingThread())
    390375        applyLayerPositionsInternal();
     
    404389}
    405390
    406 void ThreadedScrollingTree::displayDidRefresh(PlatformDisplayID displayID, ShouldSyncWithMainThread)
     391void ThreadedScrollingTree::displayDidRefresh(PlatformDisplayID displayID)
    407392{
    408393    // We're on the EventDispatcher thread or in the ThreadedCompositor thread here.
  • trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.h

    r275889 r275892  
    3838class AsyncScrollingCoordinator;
    3939
    40 enum class ShouldSyncWithMainThread : bool {
    41     No,
    42     Yes
    43 };
    44 
    4540// The ThreadedScrollingTree class lives almost exclusively on the scrolling thread and manages the
    4641// hierarchy of scrollable regions on the page. It's also responsible for dispatching events
     
    6156    void invalidate() override;
    6257
    63     WEBCORE_EXPORT void displayDidRefresh(PlatformDisplayID, ShouldSyncWithMainThread);
     58    WEBCORE_EXPORT void displayDidRefresh(PlatformDisplayID);
    6459
    6560    void willStartRenderingUpdate();
     
    120115    bool m_scrollAnimatorEnabled { false };
    121116    bool m_hasNodesWithSynchronousScrollingReasons { false };
    122     bool m_hasScheduledNextRenderingUpdate { false };
    123117};
    124118
  • trunk/Source/WebCore/platform/graphics/AnimationFrameRate.h

    r275889 r275892  
    4646
    4747// Allow a little more than 60fps to make sure we can at least hit that frame rate.
    48 constexpr const Seconds FullSpeedAnimationInterval { 31_ms };
     48constexpr const Seconds FullSpeedAnimationInterval { 15_ms };
    4949// Allow a little more than 30fps to make sure we can at least hit that frame rate.
    50 constexpr const Seconds HalfSpeedThrottlingAnimationInterval { 60_ms };
     50constexpr const Seconds HalfSpeedThrottlingAnimationInterval { 30_ms };
    5151constexpr const Seconds AggressiveThrottlingAnimationInterval { 10_s };
    5252constexpr const int IntervalThrottlingFactor { 2 };
    5353
    54 constexpr const FramesPerSecond FullSpeedFramesPerSecond = 30;
    55 constexpr const FramesPerSecond HalfSpeedThrottlingFramesPerSecond = 15;
     54constexpr const FramesPerSecond FullSpeedFramesPerSecond = 60;
     55constexpr const FramesPerSecond HalfSpeedThrottlingFramesPerSecond = 30;
    5656
    5757WEBCORE_EXPORT FramesPerSecond framesPerSecondNearestFullSpeed(FramesPerSecond);
  • trunk/Source/WebKit/ChangeLog

    r275891 r275892  
     12021-04-13  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, reverting r275889.
     4        https://bugs.webkit.org/show_bug.cgi?id=224488
     5
     6        Unintentional commit
     7
     8        Reverted changeset:
     9
     10        https://trac.webkit.org/changeset/275889
     11
    1122021-04-13  Sihui Liu  <sihui_liu@apple.com>
    213
  • trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp

    r275889 r275892  
    280280#endif
    281281
    282 void EventDispatcher::notifyScrollingTreesDisplayWasRefreshed(PlatformDisplayID displayID, bool shouldSyncWithMainThread)
     282void EventDispatcher::notifyScrollingTreesDisplayWasRefreshed(PlatformDisplayID displayID)
    283283{
    284284#if ENABLE(SCROLLING_THREAD)
    285285    LockHolder locker(m_scrollingTreesMutex);
    286286    for (auto keyValuePair : m_scrollingTrees)
    287         keyValuePair.value->displayDidRefresh(displayID, shouldSyncWithMainThread ? ShouldSyncWithMainThread::Yes : ShouldSyncWithMainThread::No);
     287        keyValuePair.value->displayDidRefresh(displayID);
    288288#endif
    289289}
     
    293293{
    294294    ASSERT(!RunLoop::isMain());
    295     notifyScrollingTreesDisplayWasRefreshed(displayID, sendToMainThread);
    296 
    297     // FIXME: We need ensure that the last update in a sequence always has "send to main thread".
     295    notifyScrollingTreesDisplayWasRefreshed(displayID);
     296
    298297    if (!sendToMainThread)
    299298        return;
  • trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.h

    r275889 r275892  
    7575    void initializeConnection(IPC::Connection*);
    7676
    77     void notifyScrollingTreesDisplayWasRefreshed(WebCore::PlatformDisplayID, bool shouldSyncWithMainThread = true);
     77    void notifyScrollingTreesDisplayWasRefreshed(WebCore::PlatformDisplayID);
    7878
    7979private:
Note: See TracChangeset for help on using the changeset viewer.