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

Issue 2714413003: Remove GlyphBuffer (Closed)

Created:
3 years, 9 months ago by f(malita)
Modified:
3 years, 9 months ago
Reviewers:
drott, eae
CC:
ajuma+watch_chromium.org, blink-reviews, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, danakj+watch_chromium.org, dshwang, drott+blinkwatch_chromium.org, krit, fmalita+watch_chromium.org, jbroman, Justin Novosad, kinuko+watch, pdr+graphicswatchlist_chromium.org, reed1, rwlbuis, Stephen Chennney
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove GlyphBuffer After dropping the simple shaper, GlyphBuffer is just an intermediate/temporary data structure we create of the fly at paint time in order to convert the shape results to SkTextBlobs: ShapeResults -> GlyphBuffer -> GlyphBufferBloberizer -> SkTextBlobs This CL introduces a ShapeResultBloberizer, and removes the GlyphBuffer intermediate: ShapeResults -> ShapeResultBloberizer -> SkTextBlobs Shape results are fed to a ShapeResultBloberizer one glyph at a time, and are greedily combined into SkTextBlobs: * glyphs sharing the same SimpleFontData are merged into the same run * runs sharing the same rotation are merged into the same blob A detail worth mentioning: while previously vertical text required an additional pass over offsets to perform verticalBaselineXOffset adjustments, the new approach applies the transformation on the fly, as the glyphs are appended. Refactor only, no functional changes expected. BUG=574136 Review-Url: https://codereview.chromium.org/2714413003 Cr-Commit-Position: refs/heads/master@{#459229} Committed: https://chromium.googlesource.com/chromium/src/+/123744c5850b84cf7f3ef9228b6d64a281732443

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : ShapeResultBloberizer::startRun() #

Patch Set 4 : rebase #

Patch Set 5 : rebase #

Patch Set 6 : cleanup #

Patch Set 7 : fix DCHECK #

Patch Set 8 : inline startRun #

Patch Set 9 : experimentally remove startRun #

Patch Set 10 : explicit shaping, unit test #

Patch Set 11 : updated unit test #

Patch Set 12 : fix unintended rebase change #

Patch Set 13 : format #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+597 lines, -678 lines) Patch
M third_party/WebKit/Source/platform/BUILD.gn View 1 2 3 4 5 6 7 8 9 4 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/Font.h View 1 2 3 4 2 chunks +0 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/Font.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 7 chunks +50 lines, -182 lines 0 comments Download
D third_party/WebKit/Source/platform/fonts/GlyphBuffer.h View 1 2 3 4 1 chunk +0 lines, -133 lines 0 comments Download
D third_party/WebKit/Source/platform/fonts/GlyphBufferTest.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -184 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaper.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +6 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaper.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +10 lines, -16 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaperTest.cpp View 1 2 3 4 5 6 7 8 9 10 4 chunks +40 lines, -28 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -1 line 0 comments Download
A third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBloberizer.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +109 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBloberizer.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +84 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBloberizerTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +173 lines, -0 lines 2 comments Download
M third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +19 lines, -28 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 10 chunks +71 lines, -81 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/shaping/ShapeResultTestInfo.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +32 lines, -0 lines 0 comments Download

Messages

Total messages: 53 (47 generated)
f(malita)
Final nail in GlyphBuffer's coffin. Cluster Telemetry shows a minor (1-2.5%) improvement for the caching-disabled ...
3 years, 9 months ago (2017-03-23 13:18:54 UTC) #45
drott
> Refactor only, no functional changes expected. And what a refactor! > Final nail in ...
3 years, 9 months ago (2017-03-23 15:36:53 UTC) #46
eae
This is awesome, thank you! LGTM
3 years, 9 months ago (2017-03-23 17:48:00 UTC) #47
f(malita)
Thanks. https://codereview.chromium.org/2714413003/diff/240001/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBloberizerTest.cpp File third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBloberizerTest.cpp (right): https://codereview.chromium.org/2714413003/diff/240001/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBloberizerTest.cpp#newcode173 third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBloberizerTest.cpp:173: } // namespace blink On 2017/03/23 15:36:52, drott ...
3 years, 9 months ago (2017-03-23 19:30:18 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2714413003/240001
3 years, 9 months ago (2017-03-23 19:31:00 UTC) #50
commit-bot: I haz the power
3 years, 9 months ago (2017-03-23 21:31:10 UTC) #53
Message was sent while issue was closed.
Committed patchset #13 (id:240001) as
https://chromium.googlesource.com/chromium/src/+/123744c5850b84cf7f3ef9228b6d...

Powered by Google App Engine
This is Rietveld 408576698