Summary: | Twitter scroll stutter: ensure that CA backing store is always deallocated on the main thread | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> | ||||||
Component: | Scrolling | Assignee: | Simon Fraser (smfr) <simon.fraser> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | cmarcelo, ews-watchlist, fred.wang, jamesr, luiz, simon.fraser, thorton, tonikitoo, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Simon Fraser (smfr)
2021-12-14 17:54:18 PST
Created attachment 447186 [details]
Patch
Comment on attachment 447186 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=447186&action=review Not the least frightening patch I've ever seen. > Source/WebCore/WebCore.xcodeproj/project.pbxproj:-33104 > - 7B582DD82716F55B004B92D0 /* (null) in Headers */, This seems bad > Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerContentsDelayedReleaser.mm:82 > + RunLoop::main().dispatch([] { Isn't it the scrolling thread runloop you're racing here (freeing the transaction), not the main thread? Comment on attachment 447186 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=447186&action=review >> Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerContentsDelayedReleaser.mm:82 >> + RunLoop::main().dispatch([] { > > Isn't it the scrolling thread runloop you're racing here (freeing the transaction), not the main thread? Probably, but we know we've exited the scrolling thread transaction (tho it may still be in the teardown phase), and we have a dispatch here so it should almost always win. I never saw us lose the race in practice. If we do, it's not the end of the world. Created attachment 447201 [details]
Patch
Committed r287079 (?): <https://commits.webkit.org/r287079> All reviewed patches have been landed. Closing bug and clearing flags on attachment 447201 [details]. |