Make it possible to safely access CALayers and PlatformCALayerCocoa objects on the scrolling thread
Created attachment 392644 [details] Patch
<rdar://problem/60106163>
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;
https://trac.webkit.org/changeset/258006/webkit