Bug 183895 - [TexMap] Make TextureMapperContextAttributes thread-specific
Summary: [TexMap] Make TextureMapperContextAttributes thread-specific
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Zan Dobersek
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-03-22 05:17 PDT by Zan Dobersek
Modified: 2018-03-22 11:08 PDT (History)
2 users (show)

See Also:


Attachments
Patch (14.09 KB, patch)
2018-03-22 05:25 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
Patch for landing (14.18 KB, patch)
2018-03-22 11:01 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zan Dobersek 2018-03-22 05:17:56 PDT
[TexMap] Make TextureMapperContextAttributes thread-specific
Comment 1 Zan Dobersek 2018-03-22 05:25:55 PDT
Created attachment 336274 [details]
Patch
Comment 2 Carlos Garcia Campos 2018-03-22 07:16:22 PDT
Comment on attachment 336274 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=336274&action=review

> Source/WebCore/platform/graphics/texmap/TextureMapperContextAttributes.cpp:42
> +    static WTF::ThreadSpecific<TextureMapperContextAttributes>* s_textureMapperContextAttributes;
> +    if (!s_textureMapperContextAttributes)
> +        s_textureMapperContextAttributes = new WTF::ThreadSpecific<TextureMapperContextAttributes>;
> +    return *s_textureMapperContextAttributes;

Should we use std::once here?
Comment 3 Zan Dobersek 2018-03-22 10:55:17 PDT
Comment on attachment 336274 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=336274&action=review

>> Source/WebCore/platform/graphics/texmap/TextureMapperContextAttributes.cpp:42
>> +    return *s_textureMapperContextAttributes;
> 
> Should we use std::once here?

Yes.
Comment 4 Zan Dobersek 2018-03-22 11:01:29 PDT
Created attachment 336289 [details]
Patch for landing
Comment 5 Zan Dobersek 2018-03-22 11:07:07 PDT
Comment on attachment 336289 [details]
Patch for landing

Clearing flags on attachment: 336289

Committed r229857: <https://trac.webkit.org/changeset/229857>
Comment 6 Zan Dobersek 2018-03-22 11:07:10 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2018-03-22 11:08:32 PDT
<rdar://problem/38758602>