Move uninteresting MD5 check to after adding it to JSON.

BUG=skia:3676

Review URL: https://codereview.chromium.org/1067053002
This commit is contained in:
mtklein 2015-04-07 13:38:48 -07:00 committed by Commit bot
parent 6c27535e6f
commit b0531a790c

View File

@ -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;
}
const char* dir = FLAGS_writePath[0];
if (0 == strcmp(dir, "@")) { // Needed for iOS.
dir = FLAGS_resourcePath[0];