diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-15 15:10:48 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-15 15:10:48 +0000 |
commit | 3f0451772109959fcb79bacf2c9a03e0eb39ff27 (patch) | |
tree | 19e1b86cc9824172c7f1c422591cc51314203fdb /tools/CopyTilesRenderer.cpp | |
parent | 76ac7f81d39a99616541ead9c40aa6d208b517af (diff) |
render_pictures: add --mismatchPath flag
When set, it will only write out images that don't match expectations.
BUG=skia:1942
R=rmistry@google.com
Author: epoger@google.com
Review URL: https://codereview.chromium.org/283123002
git-svn-id: http://skia.googlecode.com/svn/trunk@14748 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tools/CopyTilesRenderer.cpp')
-rw-r--r-- | tools/CopyTilesRenderer.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/CopyTilesRenderer.cpp b/tools/CopyTilesRenderer.cpp index 9e919e0a4f..8022092c9a 100644 --- a/tools/CopyTilesRenderer.cpp +++ b/tools/CopyTilesRenderer.cpp @@ -20,15 +20,17 @@ namespace sk_tools { : fXTilesPerLargeTile(x) , fYTilesPerLargeTile(y) { } - void CopyTilesRenderer::init(SkPicture* pict, const SkString* outputDir, - const SkString* inputFilename, bool useChecksumBasedFilenames) { + void CopyTilesRenderer::init(SkPicture* pict, const SkString* writePath, + const SkString* mismatchPath, const SkString* inputFilename, + bool useChecksumBasedFilenames) { // Do not call INHERITED::init(), which would create a (potentially large) canvas which is // not used by bench_pictures. SkASSERT(pict != NULL); // Only work with absolute widths (as opposed to percentages). SkASSERT(this->getTileWidth() != 0 && this->getTileHeight() != 0); fPicture.reset(pict)->ref(); - this->CopyString(&fOutputDir, outputDir); + this->CopyString(&fWritePath, writePath); + this->CopyString(&fMismatchPath, mismatchPath); this->CopyString(&fInputFilename, inputFilename); fUseChecksumBasedFilenames = useChecksumBasedFilenames; this->buildBBoxHierarchy(); @@ -64,13 +66,13 @@ namespace sk_tools { SkDEBUGCODE(bool extracted =) baseBitmap.extractSubset(&dst, subset); SkASSERT(extracted); - if (!fOutputDir.isEmpty()) { + if (!fWritePath.isEmpty()) { // Similar to write() in PictureRenderer.cpp, but just encodes // a bitmap directly. // TODO: Share more common code with write() to do this, to properly // write out the JSON summary, etc. SkString pathWithNumber; - make_filepath(&pathWithNumber, fOutputDir, fInputFilename); + make_filepath(&pathWithNumber, fWritePath, fInputFilename); pathWithNumber.remove(pathWithNumber.size() - 4, 4); pathWithNumber.appendf("%i.png", i++); SkBitmap copy; |