Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: tools/CopyTilesRenderer.cpp

Issue 283123002: render_pictures: add --mismatchPath flag (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix SkDebuggerGUI Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/CopyTilesRenderer.h ('k') | tools/PictureBenchmark.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/CopyTilesRenderer.cpp
diff --git a/tools/CopyTilesRenderer.cpp b/tools/CopyTilesRenderer.cpp
index 9e919e0a4ff3c57ea5d27fd317cb172f3372f6af..8022092c9a27100e823f791e2f224f77726377ee 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;
« no previous file with comments | « tools/CopyTilesRenderer.h ('k') | tools/PictureBenchmark.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698