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

Unified Diff: tools/bench_playback.cpp

Issue 540963002: Change SkPicture::draw to playback (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix nanomsg Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/bench_pictures_main.cpp ('k') | tools/bench_record.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/bench_playback.cpp
diff --git a/tools/bench_playback.cpp b/tools/bench_playback.cpp
index f5bbc12c0a999b3bf51ffeddc8b8fb65b28516d8..53c988cd6636da2a3d795c8f57e651754009c6ca 100644
--- a/tools/bench_playback.cpp
+++ b/tools/bench_playback.cpp
@@ -44,12 +44,12 @@ static SkPicture* rerecord(const SkPicture& src, bool skr) {
SkTileGridFactory factory(info);
SkPictureRecorder recorder;
- src.draw(skr ? recorder.EXPERIMENTAL_beginRecording(src.cullRect().width(),
- src.cullRect().height(),
- &factory)
- : recorder. DEPRECATED_beginRecording(src.cullRect().width(),
- src.cullRect().height(),
- &factory));
+ src.playback(skr ? recorder.EXPERIMENTAL_beginRecording(src.cullRect().width(),
+ src.cullRect().height(),
+ &factory)
+ : recorder. DEPRECATED_beginRecording(src.cullRect().width(),
+ src.cullRect().height(),
+ &factory));
return recorder.endRecording();
}
@@ -64,7 +64,7 @@ static void bench(SkPMColor* scratch, const SkPicture& src, const char* name) {
canvas->clipRect(SkRect::MakeWH(SkIntToScalar(FLAGS_tile), SkIntToScalar(FLAGS_tile)));
// Draw once to warm any caches. The first sample otherwise can be very noisy.
- picture->draw(canvas.get());
+ picture->playback(canvas.get());
WallTimer timer;
const double scale = timescale();
@@ -73,7 +73,7 @@ static void bench(SkPMColor* scratch, const SkPicture& src, const char* name) {
// We assume timer overhead (typically, ~30ns) is insignificant
// compared to draw runtime (at least ~100us, usually several ms).
timer.start();
- picture->draw(canvas.get());
+ picture->playback(canvas.get());
timer.end();
samples[i] = timer.fWall * scale;
}
« no previous file with comments | « tools/bench_pictures_main.cpp ('k') | tools/bench_record.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698