[webkit-changes] [WebKit/WebKit] 97c690: [Cocoa] Defer creating CTFonts a little longer for...

Myles C. Maxfield noreply at github.com
Fri Feb 10 17:13:42 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 97c690d57e5e569fa1afaba241addf92daf1e722
      https://github.com/WebKit/WebKit/commit/97c690d57e5e569fa1afaba241addf92daf1e722
  Author: Myles C. Maxfield <mmaxfield at apple.com>
  Date:   2023-02-10 (Fri, 10 Feb 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp

  Log Message:
  -----------
  [Cocoa] Defer creating CTFonts a little longer for installed fonts
https://bugs.webkit.org/show_bug.cgi?id=252033
rdar://105258409

Reviewed by Cameron McCormack.

https://bugs.webkit.org/show_bug.cgi?id=247987 is about how we need to defer the
CTFontDescriptor -> CTFont transformation until as late as possible, to avoid
ping-ponging between fonts and descriptors. This patch takes one small step toward
that goal, by preserving the CTFontDescriptor slightly longer when we create
a CTFont for an installed font.

* Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::preparePlatformFont):
(WebCore::platformFontLookupWithFamily):
(WebCore::fontWithFamily):

Canonical link: https://commits.webkit.org/260140@main




More information about the webkit-changes mailing list