Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Issue 1550993002: Textblob-based vertical text painting (Closed)

Created:
4 years, 11 months ago by f(malita)
Modified:
4 years, 11 months ago
Reviewers:
drott, jbroman, eae
CC:
blink-reviews, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, danakj, dshwang, drott+blinkwatch_chromium.org, krit, f(malita), Justin Novosad, kinuko+watch, pdr+graphicswatchlist_chromium.org, reed1, rwlbuis, Stephen Chennney, vmpstr+blinkwatch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Textblob-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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+126 lines, -106 lines) Patch
M third_party/WebKit/Source/platform/fonts/Font.h View 5 6 3 chunks +0 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/Font.cpp View 1 2 3 4 5 6 7 8 5 chunks +126 lines, -100 lines 0 comments Download

Messages

Total messages: 16 (8 generated)
f(malita)
No functional changes, no (notable) perf changes: https://storage.cloud.google.com/cluster-telemetry/tasks/chromium_perf_runs/fmalita-20151230072654/html/index.html
4 years, 11 months ago (2015-12-30 14:25:16 UTC) #5
eae
Very nice, LGTM!
4 years, 11 months ago (2015-12-30 15:55:53 UTC) #6
jbroman
Looks reasonable; have you run Cluster Telemetry to confirm there is no regression for the ...
4 years, 11 months ago (2015-12-30 16:07:13 UTC) #7
f(malita)
On 2015/12/30 16:07:13, jbroman wrote: > Looks reasonable; have you run Cluster Telemetry to confirm ...
4 years, 11 months ago (2015-12-30 16:22:43 UTC) #8
jbroman
lgtm
4 years, 11 months ago (2015-12-30 16:24:35 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1550993002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1550993002/160001
4 years, 11 months ago (2015-12-30 16:38:37 UTC) #12
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 11 months ago (2015-12-30 17:56:03 UTC) #14
commit-bot: I haz the power
4 years, 11 months ago (2015-12-30 17:56:59 UTC) #16
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/d8511df9e68db1fd3dfeda7ad271a4dd4caf0250
Cr-Commit-Position: refs/heads/master@{#367163}

Powered by Google App Engine
This is Rietveld 408576698