skdiff now has the option to not print out the directories it is using.

Further, test_pictures.py will call skdiff with this option.

Review URL: https://codereview.appspot.com/6347066

git-svn-id: http://skia.googlecode.com/svn/trunk@4497 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tools/skdiff_main.cpp b/tools/skdiff_main.cpp
index 34fc975..8a6162b 100644
--- a/tools/skdiff_main.cpp
+++ b/tools/skdiff_main.cpp
@@ -1071,6 +1071,8 @@
     SkDebugf(
 "    --weighted: sort by # pixels different weighted by color difference\n");
     SkDebugf(
+"    --noprintdirs: do not print the directories used.");
+    SkDebugf(
 "    baseDir: directory to read baseline images from.\n");
     SkDebugf(
 "    comparisonDir: directory to read comparison images from\n");
@@ -1093,6 +1095,7 @@
     StringArray nomatchSubstrings;
 
     bool generateDiffs = true;
+    bool printDirs = true;
 
     RecordArray differences;
     DiffSummary summary;
@@ -1132,6 +1135,10 @@
             sortProc = compare<CompareDiffWeighted>;
             continue;
         }
+        if (!strcmp(argv[i], "--noprintdirs")) {
+            printDirs = false;
+            continue;
+        }
         if (argv[i][0] != '-') {
             switch (numUnflaggedArguments++) {
                 case 0:
@@ -1165,20 +1172,28 @@
     if (!baseDir.endsWith(PATH_DIV_STR)) {
         baseDir.append(PATH_DIV_STR);
     }
-    printf("baseDir is [%s]\n", baseDir.c_str());
+    if (printDirs) {
+        printf("baseDir is [%s]\n", baseDir.c_str());
+    }
 
     if (!comparisonDir.endsWith(PATH_DIV_STR)) {
         comparisonDir.append(PATH_DIV_STR);
     }
-    printf("comparisonDir is [%s]\n", comparisonDir.c_str());
+    if (printDirs) {
+        printf("comparisonDir is [%s]\n", comparisonDir.c_str());
+    }
 
     if (!outputDir.endsWith(PATH_DIV_STR)) {
         outputDir.append(PATH_DIV_STR);
     }
     if (generateDiffs) {
-        printf("writing diffs to outputDir is [%s]\n", outputDir.c_str());
+        if (printDirs) {
+            printf("writing diffs to outputDir is [%s]\n", outputDir.c_str());
+        }
     } else {
-        printf("not writing any diffs to outputDir [%s]\n", outputDir.c_str());
+        if (printDirs) {
+            printf("not writing any diffs to outputDir [%s]\n", outputDir.c_str());
+        }
         outputDir.set("");
     }