aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar rileya@google.com <rileya@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-28 19:13:39 +0000
committerGravatar rileya@google.com <rileya@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-28 19:13:39 +0000
commitedfbff683e8f3ab55656c1818f153f605c4f433b (patch)
tree11939b6886bb80dde33a82bb455b384076dd9622 /tools
parent34bcb9f80336fe0dc56ad5f67aeb0859bf84d92e (diff)
Change picture record benchmark to include begin/end record in timings and make the source picture draw itself into record canvas, so it records the draws instead of directly copying the picture.
Review URL: https://codereview.appspot.com/6501045 git-svn-id: http://skia.googlecode.com/svn/trunk@5323 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tools')
-rw-r--r--tools/PictureBenchmark.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/PictureBenchmark.cpp b/tools/PictureBenchmark.cpp
index 164d3c356c..d24bb8b550 100644
--- a/tools/PictureBenchmark.cpp
+++ b/tools/PictureBenchmark.cpp
@@ -88,10 +88,11 @@ void RecordPictureBenchmark::run(SkPicture* pict) {
for (int i = 0; i < fRepeats + 1; ++i) {
SkPicture replayer;
- SkCanvas* recorder = replayer.beginRecording(pict->width(), pict->height());
timer->start();
- recorder->drawPicture(*pict);
+ SkCanvas* recorder = replayer.beginRecording(pict->width(), pict->height());
+ pict->draw(recorder);
+ replayer.endRecording();
timer->end();
// We want to ignore first time effects