Bug 233978 - Make FontCascade::setShouldUseSmoothing/shouldUseSmoothing thread safe
Summary: Make FontCascade::setShouldUseSmoothing/shouldUseSmoothing thread safe
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Cameron McCormack (:heycam)
Keywords: InRadar
Depends on:
Blocks: 233488
  Show dependency treegraph
Reported: 2021-12-07 22:22 PST by Cameron McCormack (:heycam)
Modified: 2021-12-14 22:23 PST (History)
5 users (show)

See Also:

Patch (1.76 KB, patch)
2021-12-07 22:29 PST, Cameron McCormack (:heycam)
heycam: review?
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cameron McCormack (:heycam) 2021-12-07 22:22:52 PST
Make FontCascade::setShouldUseSmoothing/shouldUseSmoothing thread safe
Comment 1 Cameron McCormack (:heycam) 2021-12-07 22:29:12 PST
Created attachment 446301 [details]
Comment 2 Myles C. Maxfield 2021-12-08 21:08:32 PST
Comment on attachment 446301 [details]

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

> Source/WebCore/ChangeLog:11
> +        same time from the main thread. This setting is only changed from
> +        Internals and WebView and at WebProcess initilization, but should

WebKitLegacy and WebKit have SPI for this:

+ (void)_setShouldUseFontSmoothing:(BOOL)f

void WKContextSetShouldUseFontSmoothing(WKContextRef contextRef, bool useFontSmoothing)

> Source/WebCore/platform/graphics/FontCascade.cpp:442
> +static std::atomic<bool> shouldUseFontSmoothing = true;

Is it possible to make this no longer a global? I think that would be a better solution than this.
Comment 3 Radar WebKit Bug Importer 2021-12-14 22:23:15 PST