-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[UI-side compositing] Significantly more scrolling sync events #14050
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[UI-side compositing] Significantly more scrolling sync events #14050
Conversation
EWS run on previous version of this PR (hash 031170f)
|
@@ -123,6 +123,11 @@ | |||
void RemoteScrollingTreeMac::didCommitTree() | |||
{ | |||
ASSERT(isMainRunLoop()); | |||
ASSERT(m_treeLock.isLocked()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could probably be WTF_REQUIRES_LOCK(m_treeLock)
in the header for a compile-time guarantee instead of runtime.
031170f
to
7b498cc
Compare
EWS run on current version of this PR (hash 7b498cc)
|
https://bugs.webkit.org/show_bug.cgi?id=257001 rdar://109535555 Reviewed by Matt Woodrow. In the web process scrolling model, we avoid doing some work when ThreadedScrollingTree::scrollingThreadIsActive() returns false, which means there are no scrolling animations running, and we haven't received a wheel event in the last 50ms. We need to replicate this for UI-process scrolling to optimize power. First, move scrollingThreadIsActive() to be ScrollingTree::hasRecentActivity(). Second, avoid sending `didRefreshDisplay()` to the scrolling thread if there's not recent activity. Third, return early from `RemoteLayerTreeEventDispatcher::mainThreadDisplayDidRefresh()` if there's no recent activity, avoiding a scrolling thread dispatch. Finally, return early from `RemoteScrollingTreeMac::didCommitTree()` if there are no scroll animations to start, avoiding another scrolling thread dispatch. * Source/WebCore/page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::hasRecentActivity): * Source/WebCore/page/scrolling/ScrollingTree.h: * Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp: (WebCore::ThreadedScrollingTree::willStartRenderingUpdate): (WebCore::ThreadedScrollingTree::displayDidRefresh): (WebCore::ThreadedScrollingTree::scrollingThreadIsActive): Deleted. * Source/WebCore/page/scrolling/ThreadedScrollingTree.h: * Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.cpp: (WebKit::RemoteLayerTreeEventDispatcher::scrollingTreeWasRecentlyActive): (WebKit::RemoteLayerTreeEventDispatcher::mainThreadDisplayDidRefresh): * Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.h: * Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.mm: (WebKit::RemoteScrollingTreeMac::didCommitTree): Canonical link: https://commits.webkit.org/264230@main
7b498cc
to
c6eb7d8
Compare
Committed 264230@main (c6eb7d8): https://commits.webkit.org/264230@main Reviewed commits have been landed. Closing PR #14050 and removing active labels. |
https://bugs.webkit.org/show_bug.cgi?id=257167 rdar://109685883 Unreviewed fix. Respond to review comment on WebKit#14050, using a WTF_REQUIRES_LOCK() annotation. * Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.h: * Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.mm: (WebKit::RemoteScrollingTreeMac::didCommitTree): Canonical link: https://commits.webkit.org/264405@main
https://bugs.webkit.org/show_bug.cgi?id=257167 rdar://109685883 Unreviewed fix. Respond to review comment on WebKit/WebKit#14050, using a WTF_REQUIRES_LOCK() annotation. * Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.h: * Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.mm: (WebKit::RemoteScrollingTreeMac::didCommitTree): Canonical link: https://commits.webkit.org/264405@main
c6eb7d8
7b498cc
🛠 wincairo🧪 wpe-wk2🧪 api-mac🧪 ios-wk2-wpt🧪 gtk-wk2🧪 api-ios🧪 mac-AS-debug-wk2🛠 tv-sim