[webkit-reviews] review granted: [Bug 208672] Make it possible to safely access CALayers and PlatformCALayerCocoa objects on the scrolling thread : [Attachment 392644] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Mar 6 08:17:00 PST 2020
Antti Koivisto <koivisto at iki.fi> has granted Simon Fraser (smfr)
<simon.fraser at apple.com>'s request for review:
Bug 208672: Make it possible to safely access CALayers and PlatformCALayerCocoa
objects on the scrolling thread
https://bugs.webkit.org/show_bug.cgi?id=208672
Attachment 392644: Patch
https://bugs.webkit.org/attachment.cgi?id=392644&action=review
--- Comment #4 from Antti Koivisto <koivisto at iki.fi> ---
Comment on attachment 392644
--> https://bugs.webkit.org/attachment.cgi?id=392644
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;
More information about the webkit-reviews
mailing list