Commit Graph

9 Commits

Author SHA1 Message Date
fmalita
0b01da7bca Fix TextBlobTest valgrind error
When converting text to glyph IDs, the paint needs to reflect the actual
text encoding.

R=bungeman@google.com,herb@google.com

Review URL: https://codereview.chromium.org/1404153002
2015-10-14 08:11:40 -07:00
fmalita
9ae8fe1c60 [SkTextBlob] Remove incorrect builder assert
At the end of TightRunBounds, glyphPosX cannot exceed the start of the
next run.  But glyphPosY is running ahead of glyphPosX (for
kFull_Positioning) => the glyphPosY assert is incorrect.

Since the two pointers advance in lock-step, there isn't much value in
the glyphPosY assert anyway - we might as well remove it.

BUG=chromium:542643
R=reed@google.com,bungeman@google.com

Review URL: https://codereview.chromium.org/1405463004
2015-10-13 08:59:23 -07:00
halcanary
96fcdcc219 Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002

Review URL: https://codereview.chromium.org/1316233002
2015-08-27 07:41:16 -07:00
fmalita
3c196def91 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=mtklein@google.com, reed@google.com, robertphillips@google.com

Committed: https://skia.googlesource.com/skia/+/13645ea0ea87038ebd71be3bd6d53b313069a9e4

Author: fmalita@chromium.org

Review URL: https://codereview.chromium.org/581173003
2014-09-20 05:40:22 -07:00
fmalita
e50215e598 Revert of Souped-up SkTextBlob. (patchset #3 id:40001 of https://codereview.chromium.org/581173003/)
Reason for revert:
Broke the new blobshader gm.

Original issue's 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

R=mtklein@google.com, reed@google.com, robertphillips@google.com
TBR=mtklein@google.com, reed@google.com, robertphillips@google.com
NOTREECHECKS=true
NOTRY=true

Author: fmalita@chromium.org

Review URL: https://codereview.chromium.org/588853002
2014-09-19 19:03:06 -07:00
fmalita
13645ea0ea 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=mtklein@google.com, reed@google.com, robertphillips@google.com

Author: fmalita@chromium.org

Review URL: https://codereview.chromium.org/581173003
2014-09-19 18:37:00 -07:00
bsalomon
49f085dddf "NULL !=" = NULL
R=reed@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/544233002
2014-09-05 13:34:00 -07:00
fmalita
51bf9573b8 Add some text blob bounds unit tests.
R=robertphillips@google.com

Author: fmalita@chromium.org

Review URL: https://codereview.chromium.org/498693002
2014-08-22 07:50:46 -07:00
fmalita
c6765d69e3 Add some SkTextBlob builder tests.
R=reed@google.com, robertphillips@google.com

Author: fmalita@chromium.org

Review URL: https://codereview.chromium.org/493443004
2014-08-21 15:03:04 -07:00