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

Unified Diff: tools/PictureRenderer.cpp

Issue 493363002: create sk_tools::Expectation class, similar to skiagm::Expectations class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: properly handle ignoreFailure using sk_tools::Expectation class, with unittest to exercise Created 6 years, 4 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 | « no previous file | tools/image_expectations.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/PictureRenderer.cpp
diff --git a/tools/PictureRenderer.cpp b/tools/PictureRenderer.cpp
index 7325c201b8ea2fd56acc0b82420fab265acdd2fd..ac639e59e8dfed46ca356d8dc3efa7d8db5f4148 100644
--- a/tools/PictureRenderer.cpp
+++ b/tools/PictureRenderer.cpp
@@ -297,7 +297,7 @@ static bool write(SkCanvas* canvas, const SkString& writePath, const SkString& m
SkString outputFilename;
const char *outputSubdirPtr = NULL;
if (useChecksumBasedFilenames) {
- const ImageDigest *imageDigestPtr = bitmapAndDigest.getImageDigestPtr();
+ ImageDigest *imageDigestPtr = bitmapAndDigest.getImageDigestPtr();
outputSubdirPtr = escapedInputFilename.c_str();
outputFilename.set(imageDigestPtr->getHashType());
outputFilename.append("_");
@@ -312,7 +312,7 @@ static bool write(SkCanvas* canvas, const SkString& writePath, const SkString& m
outputFilename.append(".png");
if (NULL != jsonSummaryPtr) {
- const ImageDigest *imageDigestPtr = bitmapAndDigest.getImageDigestPtr();
+ ImageDigest *imageDigestPtr = bitmapAndDigest.getImageDigestPtr();
SkString outputRelativePath;
if (outputSubdirPtr) {
outputRelativePath.set(outputSubdirPtr);
@@ -325,8 +325,8 @@ static bool write(SkCanvas* canvas, const SkString& writePath, const SkString& m
jsonSummaryPtr->add(inputFilename.c_str(), outputRelativePath.c_str(),
*imageDigestPtr, tileNumberPtr);
if (!mismatchPath.isEmpty() &&
- !jsonSummaryPtr->matchesExpectation(inputFilename.c_str(), *imageDigestPtr,
- tileNumberPtr)) {
+ !jsonSummaryPtr->getExpectation(inputFilename.c_str(),
+ tileNumberPtr).matches(*imageDigestPtr)) {
if (!write_bitmap_to_disk(bitmap, mismatchPath, outputSubdirPtr, outputFilename)) {
return false;
}
« no previous file with comments | « no previous file | tools/image_expectations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698