Currently the FontCache singleton contains some of the structures it relies on, but also has some static global variables for reasons that are unclear to me. For example, the actual font cache lives on FontCache, but the list of FontCacheClients is a global variable. The current plan is for OffscreenCanvas to use a separate FontCache so as not to affect the performance of the main FontCache. To do this, FontCache needs to be fully self-contained.
Created attachment 424762 [details] Patch
Comment on attachment 424762 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=424762&action=review > Source/WebCore/platform/graphics/FontCache.h:299 > + struct FontPlatformDataCacheKey { If we want to keep this all out of the header, we can put these things into a structure in a WTF::UniqueRef instead of directly into the FontCache object itself. Uses a little more memory, but helps keep the FontCache.h file smaller.
Created attachment 424820 [details] Patch
Comment on attachment 424820 [details] Patch Comment addressed.
Committed r275308: <https://commits.webkit.org/r275308> All reviewed patches have been landed. Closing bug and clearing flags on attachment 424820 [details].
<rdar://problem/76072958>