| Summary: | Make it possible to safely access CALayers and PlatformCALayerCocoa objects on the scrolling thread | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> | ||||
| Component: | Scrolling | Assignee: | Simon Fraser (smfr) <simon.fraser> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | cmarcelo, esprehn+autocc, ews-watchlist, fred.wang, glenn, jamesr, koivisto, kondapallykalyan, luiz, pdr, simon.fraser, thorton, tonikitoo, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=226062 | ||||||
| Attachments: |
|
||||||
|
Description
Simon Fraser (smfr)
2020-03-05 16:12:40 PST
Created attachment 392644 [details]
Patch
Comment on attachment 392644 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=392644&action=review > Source/WebCore/ChangeLog:13 > + when pushing GraphicsLayer changes to CA, and when destroying GraphicsLayers which tears down their associated What about PlatformCALayerCustom... are we sure they're not mutated in other cases than these? > Source/WebCore/page/scrolling/ScrollingTree.h:220 > +private: Why? This was already the case Comment on attachment 392644 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=392644&action=review > Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:88 > +static Lock& layerToPlatformLayerMapMutex() > +{ > + static LazyNeverDestroyed<Lock> mutex; > + static std::once_flag initializeMutex; > + std::call_once(initializeMutex, [] { > + mutex.construct(); > + }); > + return mutex.get(); > +} I think you can just do static Lock lock; |