[webkit-changes] [WebKit/WebKit] f618c1: Micro-optimize FontCascade::widthForSimpleText()

Chris Dumez noreply at github.com
Tue Oct 3 09:20:28 PDT 2023


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

  Changed paths:
    M Source/WebCore/platform/graphics/FontCascade.cpp

  Log Message:
  -----------
  Micro-optimize FontCascade::widthForSimpleText()
https://bugs.webkit.org/show_bug.cgi?id=262543

Reviewed by Alan Baradlay.

Micro-optimize FontCascade::widthForSimpleText() by introducing a new
templated addGlyphsFromText() function to avoid repeated is8Bit() checks
inside StringView::operator[].

* Source/WebCore/platform/graphics/FontCascade.cpp:
(WebCore::addGlyphsFromText):
(WebCore::FontCascade::widthForSimpleText const):

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




More information about the webkit-changes mailing list