RESOLVED FIXED 208672
Make it possible to safely access CALayers and PlatformCALayerCocoa objects on the scrolling thread
https://bugs.webkit.org/show_bug.cgi?id=208672
Summary Make it possible to safely access CALayers and PlatformCALayerCocoa objects o...
Simon Fraser (smfr)
Reported 2020-03-05 16:12:40 PST
Make it possible to safely access CALayers and PlatformCALayerCocoa objects on the scrolling thread
Attachments
Patch (9.43 KB, patch)
2020-03-05 16:20 PST, Simon Fraser (smfr)
koivisto: review+
Simon Fraser (smfr)
Comment 1 2020-03-05 16:20:59 PST
Radar WebKit Bug Importer
Comment 2 2020-03-05 16:21:21 PST
Tim Horton
Comment 3 2020-03-05 19:44:43 PST
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
Antti Koivisto
Comment 4 2020-03-06 08:17:00 PST
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;
Simon Fraser (smfr)
Comment 5 2020-03-06 11:07:39 PST
Note You need to log in before you can comment on or make changes to this bug.