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

Issue 581173003: Souped-up SkTextBlob (reland) (Closed)

Created:
6 years, 3 months ago by f(malita)
Modified:
6 years, 3 months ago
CC:
reviews_skia.org, jbroman
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

Souped-up SkTextBlob. Refactored text blob backend for improved performance: instead of using separate buffers for runs/positions/glyphs, everything is now packed in a consolidated slab (including the SkTextBlob object itself!). Benefits: * number of allocations per blob construction reduced from ~4 to 1 (also minimizes internal fragmentation) * run record size reduced by 8 bytes This takes the blob construction overhead down to negligible levels (for the current Blink uncached textblob implementation). Unfortunately, the code is much more finicky (run merging in particular) -- hence the assert spree. Multi-run blobs are vulnerable to realloc storms but this is not a problem at the moment because Blink is using one-run blobs 99% of the time. Will be addressed in the future. R=reed@google.com,mtklein@google.com,robertphillips@google.com Committed: https://skia.googlesource.com/skia/+/13645ea0ea87038ebd71be3bd6d53b313069a9e4 Committed: https://skia.googlesource.com/skia/+/3c196def91726913a417e703ac482bb2dbbfff27

Patch Set 1 #

Patch Set 2 : minor cleanup #

Total comments: 6

Patch Set 3 : review comments #

Total comments: 1

Patch Set 4 : updated assert + extra build-time validation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+285 lines, -126 lines) Patch
M include/core/SkTextBlob.h View 1 2 5 chunks +27 lines, -31 lines 0 comments Download
M src/core/SkTextBlob.cpp View 1 2 3 7 chunks +258 lines, -92 lines 0 comments Download
M tests/TextBlobTest.cpp View 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 16 (2 generated)
f(malita)
6 years, 3 months ago (2014-09-18 19:52:41 UTC) #1
mtklein
https://codereview.chromium.org/581173003/diff/20001/include/core/SkTextBlob.h File include/core/SkTextBlob.h (right): https://codereview.chromium.org/581173003/diff/20001/include/core/SkTextBlob.h#newcode95 include/core/SkTextBlob.h:95: // There are more fields following this, see the ...
6 years, 3 months ago (2014-09-19 14:33:03 UTC) #2
f(malita)
https://codereview.chromium.org/581173003/diff/20001/include/core/SkTextBlob.h File include/core/SkTextBlob.h (right): https://codereview.chromium.org/581173003/diff/20001/include/core/SkTextBlob.h#newcode95 include/core/SkTextBlob.h:95: On 2014/09/19 14:33:02, mtklein wrote: > // There are ...
6 years, 3 months ago (2014-09-19 15:42:36 UTC) #3
mtklein
lgtm
6 years, 3 months ago (2014-09-19 15:43:50 UTC) #4
jbroman
Out of curiosity, any numbers on what the impact of this is on performance or ...
6 years, 3 months ago (2014-09-19 15:47:50 UTC) #5
f(malita)
On 2014/09/19 15:47:50, jbroman wrote: > Out of curiosity, any numbers on what the impact ...
6 years, 3 months ago (2014-09-19 15:53:21 UTC) #6
reed1
lgtm https://codereview.chromium.org/581173003/diff/40001/include/core/SkTextBlob.h File include/core/SkTextBlob.h (right): https://codereview.chromium.org/581173003/diff/40001/include/core/SkTextBlob.h#newcode38 include/core/SkTextBlob.h:38: void flatten(SkWriteBuffer&) const; Does this have to be ...
6 years, 3 months ago (2014-09-19 16:49:02 UTC) #7
f(malita)
On 2014/09/19 16:49:02, reed1 wrote: > https://codereview.chromium.org/581173003/diff/40001/include/core/SkTextBlob.h > File include/core/SkTextBlob.h (right): > > https://codereview.chromium.org/581173003/diff/40001/include/core/SkTextBlob.h#newcode38 > ...
6 years, 3 months ago (2014-09-19 18:08:11 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/581173003/40001
6 years, 3 months ago (2014-09-20 01:32:51 UTC) #10
commit-bot: I haz the power
Committed patchset #3 (id:40001) as 13645ea0ea87038ebd71be3bd6d53b313069a9e4
6 years, 3 months ago (2014-09-20 01:37:04 UTC) #11
f(malita)
A revert of this CL (patchset #3 id:40001) has been created in https://codereview.chromium.org/588853002/ by fmalita@chromium.org. ...
6 years, 3 months ago (2014-09-20 02:02:24 UTC) #12
f(malita)
On 2014/09/20 02:02:24, Florin Malita wrote: > A revert of this CL (patchset #3 id:40001) ...
6 years, 3 months ago (2014-09-20 12:33:17 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/581173003/60001
6 years, 3 months ago (2014-09-20 12:34:40 UTC) #15
commit-bot: I haz the power
6 years, 3 months ago (2014-09-20 12:40:27 UTC) #16
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as 3c196def91726913a417e703ac482bb2dbbfff27

Powered by Google App Engine
This is Rietveld 408576698