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

Unified Diff: gm/gmmain.cpp

Issue 303913002: In Android framework, make tools depend on jsoncpp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Do as Thoreau would do. Created 6 years, 6 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 | « gm/gm_expectations.cpp ('k') | gyp/common_conditions.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/gmmain.cpp
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index 37237695c04a60f02c79a96d88bfd11823df5ee5..0be3454d82cc0aed01588dc9570a8ff168b054c1 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -869,7 +869,6 @@ public:
const GmResultDigest &actualResultDigest,
ErrorCombination errors,
bool ignoreFailure) {
-#ifdef SK_BUILD_JSON_WRITER
Json::Value jsonActualResults = actualResultDigest.asJsonTypeValuePair();
Json::Value *resultCollection = NULL;
@@ -901,7 +900,6 @@ public:
if (resultCollection) {
(*resultCollection)[testName] = jsonActualResults;
}
-#endif
}
/**
@@ -909,9 +907,7 @@ public:
*/
void add_expected_results_to_json_summary(const char testName[],
Expectations expectations) {
-#ifdef SK_BUILD_JSON_WRITER
this->fJsonExpectedResults[testName] = expectations.asJsonValue();
-#endif
}
/**
@@ -1271,14 +1267,12 @@ public:
// If unset, we don't do comparisons.
SkAutoTUnref<ExpectationsSource> fExpectationsSource;
-#ifdef SK_BUILD_JSON_WRITER
// JSON summaries that we generate as we go (just for output).
Json::Value fJsonExpectedResults;
Json::Value fJsonActualResults_Failed;
Json::Value fJsonActualResults_FailureIgnored;
Json::Value fJsonActualResults_NoComparison;
Json::Value fJsonActualResults_Succeeded;
-#endif
}; // end of GMMain class definition
#if SK_SUPPORT_GPU
@@ -1475,9 +1469,7 @@ DEFINE_bool2(verbose, v, false, "Give more detail (e.g. list all GMs run, more i
"each test).");
DEFINE_bool(writeChecksumBasedFilenames, false, "When writing out actual images, use checksum-"
"based filenames, as rebaseline.py will use when downloading them from Google Storage");
-#ifdef SK_BUILD_JSON_WRITER
DEFINE_string(writeJsonSummaryPath, "", "Write a JSON-formatted result summary to this file.");
-#endif
DEFINE_string2(writePath, w, "", "Write rendered images into this directory.");
DEFINE_string2(writePicturePath, p, "", "Write .skp files into this directory.");
DEFINE_int32(pdfJpegQuality, -1, "Encodes images in JPEG at quality level N, "
@@ -2201,12 +2193,10 @@ static bool parse_flags_gmmain_paths(GMMain* gmmain) {
gmmain->fExpectationsSource.reset(SkNEW_ARGS(
IndividualImageExpectationsSource, (readPath)));
} else {
-#ifdef SK_BUILD_JSON_WRITER
if (FLAGS_verbose) {
SkDebugf("reading expectations from JSON summary file %s\n", readPath);
}
gmmain->fExpectationsSource.reset(SkNEW_ARGS(JsonExpectationsSource, (readPath)));
-#endif
}
}
return true;
@@ -2413,7 +2403,6 @@ int tool_main(int argc, char** argv) {
}
#endif
-#ifdef SK_BUILD_JSON_WRITER
if (FLAGS_writeJsonSummaryPath.count() == 1) {
Json::Value root = CreateJsonTree(
gmmain.fJsonExpectedResults,
@@ -2423,7 +2412,6 @@ int tool_main(int argc, char** argv) {
SkFILEWStream stream(FLAGS_writeJsonSummaryPath[0]);
stream.write(jsonStdString.c_str(), jsonStdString.length());
}
-#endif
#if SK_SUPPORT_GPU
« no previous file with comments | « gm/gm_expectations.cpp ('k') | gyp/common_conditions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698