Changeset 286718 in webkit
- Timestamp:
- Dec 8, 2021, 1:25:41 PM (5 years ago)
- Location:
- branches/safari-612.4.2.1-branch/Source/WebCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
page/scrolling/ScrollingTree.cpp (modified) (1 diff)
-
page/scrolling/ThreadedScrollingTree.cpp (modified) (2 diffs)
-
page/scrolling/ThreadedScrollingTree.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-612.4.2.1-branch/Source/WebCore/ChangeLog
r286716 r286718 1 2021-12-01 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r286352. rdar://problem/85928816 4 5 Custom application of r286352 to introduce frameDuration() for a future patch. 6 7 Pass the timestamp for scrolling thread animations through all the serviceScrollAnimation() calls 8 https://bugs.webkit.org/show_bug.cgi?id=233678 9 10 Reviewed by Tim Horton. 11 12 Source/WebCore: 13 14 All scroll animations serviced at the same time should use a common timestamp, and 15 avoid multiple calls to MonotonicTime::now() by passing the time down through from 16 ThreadedScrollingTree::displayDidRefreshOnScrollingThread(). 17 18 Also minor refactoring in ThreadedScrollingTree to prepare for a future patch. 19 20 * page/scrolling/ScrollingTree.cpp: 21 (WebCore::ScrollingTree::nominalFramesPerSecond): 22 * page/scrolling/ScrollingTreeScrollingNode.h: 23 * page/scrolling/ScrollingTreeScrollingNodeDelegate.h: 24 * page/scrolling/ThreadedScrollingTree.cpp: 25 (WebCore::ThreadedScrollingTree::frameDuration): 26 (WebCore::ThreadedScrollingTree::maxAllowableRenderingUpdateDurationForSynchronization): 27 (WebCore::ThreadedScrollingTree::serviceScrollAnimations): 28 (WebCore::ThreadedScrollingTree::displayDidRefreshOnScrollingThread): 29 * page/scrolling/ThreadedScrollingTree.h: 30 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: 31 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: 32 (WebCore::ScrollingTreeFrameScrollingNodeMac::serviceScrollAnimation): 33 * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h: 34 * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm: 35 (WebCore::ScrollingTreeOverflowScrollingNodeMac::serviceScrollAnimation): 36 * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h: 37 * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm: 38 (WebCore::ScrollingTreeScrollingNodeDelegateMac::serviceScrollAnimation): 39 * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp: 40 (WebCore::ScrollingTreeFrameScrollingNodeNicosia::serviceScrollAnimation): 41 * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h: 42 * page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp: 43 (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::serviceScrollAnimation): 44 * page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h: 45 * page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.cpp: 46 (WebCore::ScrollingTreeScrollingNodeDelegateNicosia::serviceScrollAnimation): 47 * page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.h: 48 49 Source/WebKit: 50 51 * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h: 52 53 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@286352 268f45cc-cd09-0410-ab3c-d52691b4dbfc 54 55 2021-11-30 Simon Fraser <simon.fraser@apple.com> 56 57 Custom application of r286352 to prepare for a future patch. 58 59 Pass the timestamp for scrolling thread animations through all the serviceScrollAnimation() calls 60 https://bugs.webkit.org/show_bug.cgi?id=233678 61 62 Reviewed by Tim Horton. 63 64 All scroll animations serviced at the same time should use a common timestamp, and 65 avoid multiple calls to MonotonicTime::now() by passing the time down through from 66 ThreadedScrollingTree::displayDidRefreshOnScrollingThread(). 67 68 Also minor refactoring in ThreadedScrollingTree to prepare for a future patch. 69 70 (WebCore::ThreadedScrollingTree::frameDuration): 71 (WebCore::ThreadedScrollingTree::displayDidRefreshOnScrollingThread): 72 * page/scrolling/ThreadedScrollingTree.h: 73 1 74 2021-12-01 Alan Coon <alancoon@apple.com> 2 75 -
branches/safari-612.4.2.1-branch/Source/WebCore/page/scrolling/ScrollingTree.cpp
r278253 r286718 701 701 } 702 702 703 std::optional< unsigned> ScrollingTree::nominalFramesPerSecond()703 std::optional<FramesPerSecond> ScrollingTree::nominalFramesPerSecond() 704 704 { 705 705 Locker locker { m_treeStateLock }; -
branches/safari-612.4.2.1-branch/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp
r278923 r286718 29 29 #if ENABLE(ASYNC_SCROLLING) && ENABLE(SCROLLING_THREAD) 30 30 31 #include "AnimationFrameRate.h" 31 32 #include "AsyncScrollingCoordinator.h" 32 33 #include "Logging.h" … … 297 298 } 298 299 300 Seconds ThreadedScrollingTree::frameDuration() 301 { 302 auto displayFPS = nominalFramesPerSecond().value_or(FullSpeedFramesPerSecond); 303 return 1_s / (double)displayFPS; 304 } 305 299 306 Seconds ThreadedScrollingTree::maxAllowableRenderingUpdateDurationForSynchronization() 300 307 { 301 308 constexpr double allowableFrameFraction = 0.5; 302 auto displayFPS = nominalFramesPerSecond().value_or(60); 303 Seconds frameDuration = 1_s / (double)displayFPS; 304 return allowableFrameFraction * frameDuration; 309 return allowableFrameFraction * frameDuration(); 305 310 } 306 311 -
branches/safari-612.4.2.1-branch/Source/WebCore/page/scrolling/ThreadedScrollingTree.h
r278923 r286718 95 95 void delayedRenderingUpdateDetectionTimerFired(); 96 96 97 Seconds frameDuration(); 97 98 Seconds maxAllowableRenderingUpdateDurationForSynchronization(); 98 99
Note:
See TracChangeset
for help on using the changeset viewer.