DescriptionTextblob-based vertical text painting
We're currently devolving to the legacy API when painting vertical text
(due to mixed rotations required for upright vs. non-upright subruns).
This CL enhances the textblob paint path to also handle mixed/upright
subruns, unifies the glyph buffer paint methods and removes the legacy
path (Font::drawGlyphs, SkCanvas::drawPosText).
Main changes:
* refactor the one-shot Font::buildTextBlob() as a text blob producer
* refactor Font::drawGlypBuffer() as a text blob consumer
* fold the drawGlyphs x-offset adjustments for vertical into the blob
factory
* fold the drawGlyphs CCW rotation for vertical text into
drawGlyphBuffer
The blob factory is mostly lifted from Font::buildTextBlob(), with
additional logic to emit multiple blobs (when rotation changes) and
handle x-offset adjustments.
Note 1: this doesn't change the blob caching policy: only glyph buffers
which can be represented as a single, non-rotated blob are cached
(same as before).
Note 2: we now avoid the extra offset array stack copy in drawGlyphs by
applying the adjustment on the fly, as we copy data into the blob.
BUG=465353
R=jbroman@chromium.org,eae@chromium.org,drott@chromium.org
Committed: https://crrev.com/d8511df9e68db1fd3dfeda7ad271a4dd4caf0250
Cr-Commit-Position: refs/heads/master@{#367163}
Patch Set 1 #Patch Set 2 : v2 #Patch Set 3 : v3 #Patch Set 4 : minor cleanup #Patch Set 5 : reinstate Font::drawTextBlob for clarity #Patch Set 6 : track ccw rotation specifically #Patch Set 7 : simpler rotation matrix setup #
Total comments: 2
Patch Set 8 : rotation enum #Patch Set 9 : missed one bool after enum update #
Messages
Total messages: 16 (8 generated)
|