aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/gmmain.cpp
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-04-09 20:20:10 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-04-09 20:20:10 +0000
commit8e529b794703821a85cd7de6d52d4c593299e293 (patch)
tree7cf37e774dc94542b6685a81003ddaf174f9edf8 /gm/gmmain.cpp
parent0ba70658a6e8d2c9b0d3cff6615ea045d33e8fc4 (diff)
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
Diffstat (limited to 'gm/gmmain.cpp')
-rw-r--r--gm/gmmain.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index def00948f9..31e807491c 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -423,9 +423,10 @@ static ErrorBitfield compare_to_reference_image(const SkString& name,
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;
}
}