diff options
-rw-r--r-- | tools/PictureRenderer.cpp | 5 | ||||
-rw-r--r-- | tools/render_pictures_main.cpp | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tools/PictureRenderer.cpp b/tools/PictureRenderer.cpp index 85bd194bbe..2eb89b2370 100644 --- a/tools/PictureRenderer.cpp +++ b/tools/PictureRenderer.cpp @@ -210,7 +210,7 @@ void TiledPictureRenderer::init(SkPicture* pict) { int numberOfClones = fNumThreads - 1; // This will be deleted in end(). fPictureClones = SkNEW_ARRAY(SkPicture, numberOfClones); - fPictureClones->clone(fPictureClones, numberOfClones); + fPicture->clone(fPictureClones, numberOfClones); } } } @@ -315,7 +315,8 @@ struct ThreadData { } const SkRect* nextTile() { - if (int32_t i = sk_atomic_inc(fTileCounter) < fTileRects->count()) { + int32_t i = sk_atomic_inc(fTileCounter); + if (i < fTileRects->count()) { return &fTileRects->operator[](i); } return NULL; diff --git a/tools/render_pictures_main.cpp b/tools/render_pictures_main.cpp index 6066334416..764bea06a1 100644 --- a/tools/render_pictures_main.cpp +++ b/tools/render_pictures_main.cpp @@ -102,6 +102,7 @@ static bool render_picture(const SkString& inputPath, const SkString& outputDir, inputPath.c_str()); renderer.init(&picture); + renderer.setup(); SkString outputPath; make_output_filepath(&outputPath, outputDir, inputFilename); |