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
diff --git a/tools/PictureBenchmark.cpp b/tools/PictureBenchmark.cpp
index 164d3c3..d24bb8b 100644
--- a/tools/PictureBenchmark.cpp
+++ b/tools/PictureBenchmark.cpp
@@ -88,10 +88,11 @@
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