DescriptionSouped-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 #
Messages
Total messages: 16 (2 generated)
|