New issue
Advanced search Search tips

Issue 864387 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task



Sign in to add a comment

Measure all glyphs for a shape result together

Project Member Reported by e...@chromium.org, Jul 17

Issue description

The current shaping implementation in blink computes the bounds for each glyph after shaping, in ShapeResult::ComputeGlyphPositions, by calling SimpleFontData::BoundsForGlyph for each glyph.

This eventually calls into the Skia SkPaint::getTextWidths method.

We spend more time doing glyph computation than shaping in many cases, even though shaping also needs the text metrics. 

Ideally we'd get the bounds as a part of the shaping operation but that's a big change. Another option would be to call SkPaint::getTextWidths for the entire glyph buffer at once (as it takes a list of glyphs) instead of doing it per glyph.

This isn't urgent at all but might be an interesting optimization opportunity in the future.
 

Sign in to add a comment