[webkit-changes] [WebKit/WebKit] 84766e: Use HashMap::ensure() in FontCascadeFonts::glyphDa...

Chris Dumez noreply at github.com
Tue Oct 3 15:01:43 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 84766e172527d80c8b872249bb705dcea576a024
      https://github.com/WebKit/WebKit/commit/84766e172527d80c8b872249bb705dcea576a024
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2023-10-03 (Tue, 03 Oct 2023)

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

  Log Message:
  -----------
  Use HashMap::ensure() in FontCascadeFonts::glyphDataForCharacter()
https://bugs.webkit.org/show_bug.cgi?id=262514

Reviewed by Alexey Shvayka.

Use HashMap::ensure() in FontCascadeFonts::glyphDataForCharacter() instead of
adding a "null" value and then checking if the value is null. This simplifies
the code a bit and may be a little more efficient.

* Source/WebCore/platform/graphics/FontCascadeFonts.cpp:
(WebCore::FontCascadeFonts::GlyphPageCacheEntry::GlyphPageCacheEntry):
(WebCore::FontCascadeFonts::glyphDataForCharacter):
* Source/WebCore/platform/graphics/FontCascadeFonts.h:

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




More information about the webkit-changes mailing list