aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/TextBlobTest.cpp
diff options
context:
space:
mode:
authorGravatar fmalita <fmalita@chromium.org>2014-09-20 05:40:22 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-09-20 05:40:22 -0700
commit3c196def91726913a417e703ac482bb2dbbfff27 (patch)
treed705d2d7ad765bd7918982440e762883224d4358 /tests/TextBlobTest.cpp
parenta56d1d8889e9f2ccdeb9b08d7e719426167bc69d (diff)
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
Diffstat (limited to 'tests/TextBlobTest.cpp')
-rw-r--r--tests/TextBlobTest.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/tests/TextBlobTest.cpp b/tests/TextBlobTest.cpp
index 70c9ddc861..5d08b0147d 100644
--- a/tests/TextBlobTest.cpp
+++ b/tests/TextBlobTest.cpp
@@ -175,9 +175,6 @@ private:
}
SkAutoTUnref<const SkTextBlob> blob(builder.build());
- REPORTER_ASSERT(reporter, SkToBool(blob->fGlyphBuffer) == (glyphCount > 0));
- REPORTER_ASSERT(reporter, SkToBool(blob->fPosBuffer) == (posCount > 0));
- REPORTER_ASSERT(reporter, SkToBool(blob->fRuns.get()) == (inCount > 0));
SkTextBlob::RunIterator it(blob);
for (unsigned i = 0; i < outCount; ++i) {