Change picture record benchmark to include begin/end record in timings and make the...
authorrileya@google.com <rileya@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 28 Aug 2012 19:13:39 +0000 (19:13 +0000)
committerrileya@google.com <rileya@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 28 Aug 2012 19:13:39 +0000 (19:13 +0000)
Review URL: https://codereview.appspot.com/6501045

git-svn-id: http://skia.googlecode.com/svn/trunk@5323 2bbb7eff-a529-9590-31e7-b0007b416f81

tools/PictureBenchmark.cpp

index 164d3c3..d24bb8b 100644 (file)
@@ -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