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

Unified Diff: gm/gmmain.cpp

Issue 22865029: Fix expectations in GM PDF rendering (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Use dash in configName Created 7 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
Index: gm/gmmain.cpp
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index 4db3a0d24272d26c0c4a59f31a0933cac0e86045..4ad045e741a6bc13ab2d91e9036737e0de96328b 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -864,10 +864,10 @@ public:
* if we don't have a usable bitmap representation
*/
ErrorCombination compare_test_results_to_stored_expectations(
- GM* gm, const ConfigData& gRec,
+ GM* gm, const ConfigData& gRec, const char* configName,
const BitmapAndDigest* actualBitmapAndDigest) {
- SkString shortNamePlusConfig = make_shortname_plus_config(gm->shortName(), gRec.fName);
+ SkString shortNamePlusConfig = make_shortname_plus_config(gm->shortName(), configName);
ErrorCombination errors;
@@ -905,7 +905,7 @@ public:
*/
Expectations expectations = expectationsSource->get(nameWithExtension.c_str());
errors.add(compare_to_expectations(expectations, *actualBitmapAndDigest,
- gm->shortName(), gRec.fName, "", true));
+ gm->shortName(), configName, "", true));
} else {
// If we are running without expectations, we still want to
// record the actual results.
@@ -1022,7 +1022,7 @@ public:
}
BitmapAndDigest bitmapAndDigest(*bitmap);
errors.add(compare_test_results_to_stored_expectations(
- gm, gRec, &bitmapAndDigest));
+ gm, gRec, gRec.fName, &bitmapAndDigest));
if (writePath && (gRec.fFlags & kWrite_ConfigFlag)) {
path = make_bitmap_filename(writePath, gm->shortName(), gRec.fName,
@@ -1051,14 +1051,14 @@ public:
continue;
}
- BitmapAndDigest bitmapAndDigest(pdfBitmap);
- errors.add(compare_test_results_to_stored_expectations(
- gm, gRec, &bitmapAndDigest));
-
SkString configName(gRec.fName);
epoger 2013/08/21 17:55:32 I guess it wouldn't work for gRec.fName to return
ducky 2013/08/21 18:01:34 Nope. gRec doesn't have any fields to run arbitrar
epoger 2013/08/21 18:05:20 Gotcha, thanks for the explanation. Would it make
- configName.append("_");
+ configName.append("-");
configName.append(pdfRasterizers[i]->fName);
+ BitmapAndDigest bitmapAndDigest(pdfBitmap);
+ errors.add(compare_test_results_to_stored_expectations(
+ gm, gRec, configName.c_str(), &bitmapAndDigest));
+
if (writePath && (gRec.fFlags & kWrite_ConfigFlag)) {
path = make_bitmap_filename(writePath, gm->shortName(), configName.c_str(),
"", bitmapAndDigest.fDigest);
@@ -1073,7 +1073,7 @@ public:
SkAutoTUnref<SkStreamAsset> documentStream(document.detachAsStream());
errors.add(compare_test_results_to_stored_expectations(
- gm, gRec, NULL));
+ gm, gRec, gRec.fName, NULL));
if (writePath && (gRec.fFlags & kWrite_ConfigFlag)) {
path = make_filename(writePath, gm->shortName(), gRec.fName, "", "xps");
@@ -1825,7 +1825,7 @@ static bool prepare_subdirectories(const char *root, bool useFileHierarchy,
if (config.fBackend == kPDF_Backend) {
for (int j = 0; j < pdfRasterizers.count(); j++) {
SkString pdfSubdir = subdir;
- pdfSubdir.appendf("_%s", pdfRasterizers[j]->fName);
+ pdfSubdir.appendf("-%s", pdfRasterizers[j]->fName);
if (!sk_mkdir(pdfSubdir.c_str())) {
return false;
}
« no previous file with comments | « expectations/gm/base-macpro/expected-results.json ('k') | gm/tests/outputs/add-config-pdf/output-expected/json-summary.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698