aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-11-06 16:54:40 +0000
committerGravatar djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-11-06 16:54:40 +0000
commitfd9720cfec6bc50fa77d40ffdf2f6cb4b5150d4e (patch)
treeb6a16432a649ced2155982c3d3d2c6ef8577cb5f /tools
parent30d35f23ae390043462e2aa5fc6863a4621aa74d (diff)
Fix the PictureRecord step of BenchPictures.
Review URL: https://codereview.appspot.com/6820100 git-svn-id: http://skia.googlecode.com/svn/trunk@6311 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tools')
-rw-r--r--tools/PictureRenderer.cpp5
-rw-r--r--tools/PictureRenderer.h3
2 files changed, 8 insertions, 0 deletions
diff --git a/tools/PictureRenderer.cpp b/tools/PictureRenderer.cpp
index d407b0eea8..23223da516 100644
--- a/tools/PictureRenderer.cpp
+++ b/tools/PictureRenderer.cpp
@@ -164,6 +164,11 @@ static bool writeAppendNumber(SkCanvas* canvas, const SkString* path, int number
///////////////////////////////////////////////////////////////////////////////////////////////
+SkCanvas* RecordPictureRenderer::setupCanvas(int width, int height) {
+ // defer the canvas setup until the render step
+ return NULL;
+}
+
bool RecordPictureRenderer::render(const SkString*) {
SkAutoTUnref<SkPicture> replayer(this->createPicture());
SkCanvas* recorder = replayer->beginRecording(fPicture->width(), fPicture->height(),
diff --git a/tools/PictureRenderer.h b/tools/PictureRenderer.h
index a3c879a2ab..3858f8145f 100644
--- a/tools/PictureRenderer.h
+++ b/tools/PictureRenderer.h
@@ -169,6 +169,9 @@ class RecordPictureRenderer : public PictureRenderer {
virtual SkString getNormalTimeFormat() SK_OVERRIDE { return SkString("%6.4f"); }
+protected:
+ virtual SkCanvas* setupCanvas(int width, int height) SK_OVERRIDE;
+
private:
virtual SkString getConfigNameInternal() SK_OVERRIDE;
};