[Webkit-unassigned] [Bug 233747] New: move FontCache singleton and instance on WorkerGlobalScope to ThreadGlobalData
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Dec 1 22:27:42 PST 2021
https://bugs.webkit.org/show_bug.cgi?id=233747
Bug ID: 233747
Summary: move FontCache singleton and instance on
WorkerGlobalScope to ThreadGlobalData
Product: WebKit
Version: WebKit Local Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Layout and Rendering
Assignee: webkit-unassigned at lists.webkit.org
Reporter: heycam at apple.com
CC: bfulgham at webkit.org, simon.fraser at apple.com,
zalan at apple.com
There are various places in font code where we need access to a FontCache instance. Currently we:
* assume that we're on the main thread (and call FontCache::singleton()), or
* get a FontCache off WorkerGlobalScope and pass it down (or store it) where it's needed, then pass it to fontCacheFallingBackToSingleton
Having to thread through, or store, the FontCache pointer is inconvenient, and there are some places where we don't have access to a FontCache pointer, but we're on a worker, and we call fontCacheFallingBackToSingleton and get back the main thread's instance.
I think it would be cleaner if we moved both the main thread FontCache singleton, and the one stored on a WorkerGlobalScope, to ThreadGlobalData, which is easily globally accessible. Performing a TLS lookup is cheap these days.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211202/539ed9c6/attachment.htm>
More information about the webkit-unassigned
mailing list