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

Unified Diff: dm/DM.cpp

Issue 1067053002: Move uninteresting MD5 check to after adding it to JSON. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DM.cpp
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 5d85e22b3a8e989d30ff358ead3f1098df882c37..296b7c88d7fb3ad34390c1eae7f67a9b4d768e03 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -455,7 +455,7 @@ struct Task {
FLAGS_readPath[0]));
}
- if (!FLAGS_writePath.isEmpty() && !gUninterestingHashes.contains(md5)) {
+ if (!FLAGS_writePath.isEmpty()) {
const char* ext = task->sink->fileExtension();
if (data->getLength()) {
WriteToDisk(*task, md5, ext, data, data->getLength(), NULL);
@@ -483,6 +483,12 @@ struct Task {
result.md5 = md5;
JsonWriter::AddBitmapResult(result);
+ // If an MD5 is uninteresting, we want it noted in the JSON file,
+ // but don't want to dump it out as a .png (or whatever ext is).
+ if (gUninterestingHashes.contains(md5)) {
+ return;
+ }
borenet 2015/04/08 11:47:54 I didn't realize WriteToDisk did more than write t
+
const char* dir = FLAGS_writePath[0];
if (0 == strcmp(dir, "@")) { // Needed for iOS.
dir = FLAGS_resourcePath[0];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698