Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: aad1367818261835e2339826089134937752e81d
      
https://github.com/WebKit/WebKit/commit/aad1367818261835e2339826089134937752e81d
  Author: Simon Fraser <[email protected]>
  Date:   2023-02-06 (Mon, 06 Feb 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/Font.cpp
    M Source/WebCore/platform/graphics/Font.h

  Log Message:
  -----------
  Heap-allocate Font::m_glyphPathMap
https://bugs.webkit.org/show_bug.cgi?id=251814
rdar://105098022

Reviewed by Myles C. Maxfield.

GlyphMetricsMap<std::optional<Path>>> is 896 bytes and rarely used so 
heap-allocate it, reducing Font from 1256
to 352 bytes.

Also change the return value of Font::pathForGlyph to a Path reference, since 
this eliminates the need for
the scary comments, and the only caller copies anyway.

* Source/WebCore/platform/graphics/Font.cpp:
(WebCore::Font::pathForGlyph const):
* Source/WebCore/platform/graphics/Font.h:

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to