DescriptionAdd ShapeResult::RunInfo glyph iterators
Introduce a couple of ShapeResult::RunInfo helper templates, to separate
the glyph iteration logic from the current glyphBuffer routines. Refactor
existing clients to use these helpers.
The main objective is to externalize the glyph iteration logic (such that
it can be reused for direct ShapeResultBuffer->text blob construction in
the future), but the CL also includes a couple of tangential refactors:
* simplify the character index range checks
* de-templetize fillGlyphBufferForRun() and push the outer run loop into
it (also renamed to fillGlyphBufferForResult and updated to return the
total accumulated advance instead of advance delta)
Note on the last point: the TextDirection template param was only used for
index range checking; with the refactors above, we only branch on
direction when the index is out-of-range - which is uncommon and doesn't
warrant template parametrization.
BUG=574136
R=drott@chromium.org,eae@chromium.org
Review-Url: https://codereview.chromium.org/2715773002
Cr-Commit-Position: refs/heads/master@{#453215}
Committed: https://chromium.googlesource.com/chromium/src/+/f90c9bae46bb1f944c1a6a9bff53e65e1cb29906
Patch Set 1 #Patch Set 2 : cleanup #Patch Set 3 : cleanup #Patch Set 4 : de-templetize fillGlyphBufferForRun() #Patch Set 5 : fillGlyphBufferForResult #
Messages
Total messages: 22 (17 generated)
|