change -d option to write out complete images (that differed from the baseline)



git-svn-id: http://skia.googlecode.com/svn/trunk@3632 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index def0094..31e8074 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -423,9 +423,10 @@
     SkBitmap diffBitmap;
     errors = compare(bitmap, comparisonBitmap, name, renderModeDescriptor,
                      diffPath ? &diffBitmap : NULL);
-    if ((ERROR_NONE == errors) && diffPath) {
-        SkString diffName = make_filename(diffPath, "", name, ".diff.png");
-        if (!write_bitmap(diffName, diffBitmap)) {
+    if ((ERROR_NONE != errors) && diffPath) {
+        // write out the generated image
+        SkString genName = make_filename(diffPath, "", name, "png");
+        if (!write_bitmap(genName, bitmap)) {
             errors |= ERROR_WRITING_REFERENCE_IMAGE;
         }
     }