diff --git a/bench/benchmain.cpp b/bench/benchmain.cpp index eb3947abad..ef83d192e5 100644 --- a/bench/benchmain.cpp +++ b/bench/benchmain.cpp @@ -525,14 +525,14 @@ int tool_main(int argc, char** argv) { if (NULL != canvas) { canvas->clear(SK_ColorWHITE); - if (FLAGS_clip) { - perform_clip(canvas, dim.fX, dim.fY); + if (FLAGS_clip) { + perform_clip(canvas, dim.fX, dim.fY); } - if (FLAGS_scale) { - perform_scale(canvas, dim.fX, dim.fY); + if (FLAGS_scale) { + perform_scale(canvas, dim.fX, dim.fY); } - if (FLAGS_rotate) { - perform_rotate(canvas, dim.fX, dim.fY); + if (FLAGS_rotate) { + perform_rotate(canvas, dim.fX, dim.fY); } } diff --git a/dm/DMTileGridTask.cpp b/dm/DMTileGridTask.cpp index bc76b8018a..e34ac7493c 100644 --- a/dm/DMTileGridTask.cpp +++ b/dm/DMTileGridTask.cpp @@ -30,8 +30,8 @@ void TileGridTask::draw() { SkIPoint::Make(0,0), // Offset. }; SkAutoTUnref factory(SkNEW_ARGS(SkTileGridPictureFactory, (info))); - SkAutoTUnref recorded(RecordPicture(fGM.get(), - SkPicture::kUsePathBoundsForClip_RecordingFlag, + SkAutoTUnref recorded(RecordPicture(fGM.get(), + SkPicture::kUsePathBoundsForClip_RecordingFlag, factory)); SkBitmap full; diff --git a/dm/DMUtil.h b/dm/DMUtil.h index 803e44022c..7c112b3543 100644 --- a/dm/DMUtil.h +++ b/dm/DMUtil.h @@ -16,8 +16,8 @@ namespace DM { SkString UnderJoin(const char* a, const char* b); // Draw gm to picture. Passes recordFlags to SkPictureRecorder::beginRecording(). -SkPicture* RecordPicture(skiagm::GM* gm, - uint32_t recordFlags = 0, +SkPicture* RecordPicture(skiagm::GM* gm, + uint32_t recordFlags = 0, SkPictureFactory* factory = NULL); // Prepare bitmap to have gm or bench draw into it with this config. diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h index c298b3de2d..8d3061cd08 100644 --- a/include/core/SkPicture.h +++ b/include/core/SkPicture.h @@ -445,9 +445,9 @@ public: } /** Signal that the caller is done recording. This invalidates the canvas - returned by beginRecording/getRecordingCanvas, and returns the + returned by beginRecording/getRecordingCanvas, and returns the created SkPicture. Note that the returned picture has its creation - ref which the caller must take ownership of. + ref which the caller must take ownership of. */ SkPicture* endRecording() { if (NULL != fPicture.get()) { diff --git a/include/core/SkTileGridPicture.h b/include/core/SkTileGridPicture.h index c1929f46a6..b6fd01dd92 100644 --- a/include/core/SkTileGridPicture.h +++ b/include/core/SkTileGridPicture.h @@ -60,7 +60,7 @@ public: SkTileGridPictureFactory(const SkTileGridPicture::TileGridInfo& info) : fInfo(info) { } virtual SkPicture* create(int width, int height) SK_OVERRIDE { - return SkNEW_ARGS(SkTileGridPicture, (width, height, fInfo)); + return SkNEW_ARGS(SkTileGridPicture, (width, height, fInfo)); } protected: diff --git a/samplecode/SamplePicture.cpp b/samplecode/SamplePicture.cpp index a786750454..51e8f0b67a 100644 --- a/samplecode/SamplePicture.cpp +++ b/samplecode/SamplePicture.cpp @@ -83,7 +83,7 @@ public: fPicture = recorder.endRecording(); - // fPicture now has (4) references to fSubPicture. We can release our ref, + // fPicture now has (4) references to fSubPicture. We can release our ref, // and just unref fPicture in our destructor, and it will in turn take care of // the other references to fSubPicture fSubPicture->unref(); diff --git a/tools/PictureRenderer.cpp b/tools/PictureRenderer.cpp index a1098d9c16..59e4948da0 100644 --- a/tools/PictureRenderer.cpp +++ b/tools/PictureRenderer.cpp @@ -991,7 +991,7 @@ public: class SkRTreePictureFactory : public SkPictureFactory { private: virtual SkPicture* create(int width, int height) SK_OVERRIDE { - return SkNEW(RTreePicture); + return SkNEW(RTreePicture); } private: diff --git a/tools/bench_record.cpp b/tools/bench_record.cpp index 283ba6ca57..19bff782c3 100644 --- a/tools/bench_record.cpp +++ b/tools/bench_record.cpp @@ -59,21 +59,21 @@ static SkPictureFactory* quadtree_factory(int* recordingFlags) { } static PictureFactory parse_FLAGS_bbh() { - if (FLAGS_bbh.isEmpty()) { - return &vanilla_factory; + if (FLAGS_bbh.isEmpty()) { + return &vanilla_factory; } if (FLAGS_bbh.count() != 1) { SkDebugf("Multiple bbh arguments supplied.\n"); return NULL; } - if (FLAGS_bbh.contains("rtree")) { - return rtree_factory; + if (FLAGS_bbh.contains("rtree")) { + return rtree_factory; } - if (FLAGS_bbh.contains("tilegrid")) { - return tilegrid_factory; + if (FLAGS_bbh.contains("tilegrid")) { + return tilegrid_factory; } - if (FLAGS_bbh.contains("quadtree")) { - return quadtree_factory; + if (FLAGS_bbh.contains("quadtree")) { + return quadtree_factory; } SkDebugf("Invalid bbh type %s, must be one of rtree, tilegrid, quadtree.\n", FLAGS_bbh[0]); return NULL;