diff options
author | mtklein <mtklein@chromium.org> | 2014-10-27 10:27:10 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-27 10:27:10 -0700 |
commit | 4477c3c0e6eb064772aefe8737425cd1c2ce557f (patch) | |
tree | e841aeb0174e7ddc621f0b5dca88592e8c37d975 /tests/RecordReplaceDrawTest.cpp | |
parent | 5e44b00392e791088b693a0b462b107b0b5a91ba (diff) |
Cut down SkBBH API more.
- The expected case is now a single bulk-load insert() call instead of N;
- reserve() and flushDeferredInserts() can fold into insert() now;
- SkBBH subclasses may take ownership of the bounds
This appears to be a performance no-op on both my Mac and N5. I guess
even the simplest indirect branch predictor ("same as last time") can predict
the repeated virtual calls to SkBBH::insert() perfectly.
BUG=skia:
Review URL: https://codereview.chromium.org/670213002
Diffstat (limited to 'tests/RecordReplaceDrawTest.cpp')
-rw-r--r-- | tests/RecordReplaceDrawTest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/RecordReplaceDrawTest.cpp b/tests/RecordReplaceDrawTest.cpp index 6ce45e43d5..5d407387da 100644 --- a/tests/RecordReplaceDrawTest.cpp +++ b/tests/RecordReplaceDrawTest.cpp @@ -103,7 +103,7 @@ void test_replacements(skiatest::Reporter* r, bool useBBH) { { SkRTreeFactory bbhFactory; SkPictureRecorder recorder; - SkCanvas* canvas = recorder.beginRecording(SkIntToScalar(kWidth), SkIntToScalar(kHeight), + SkCanvas* canvas = recorder.beginRecording(SkIntToScalar(kWidth), SkIntToScalar(kHeight), useBBH ? &bbhFactory : NULL); SkAutoTDelete<SkPaint> paint(SkNEW(SkPaint)); @@ -116,7 +116,7 @@ void test_replacements(skiatest::Reporter* r, bool useBBH) { } GrReplacements replacements; - GrReplacements::ReplacementInfo* ri = replacements.newReplacement(pic->uniqueID(), + GrReplacements::ReplacementInfo* ri = replacements.newReplacement(pic->uniqueID(), 0, SkMatrix::I()); ri->fStop = 2; ri->fPos.set(0, 0); |