diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-01-15 21:54:27 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-01-15 21:54:27 +0000 |
commit | f14e4b0482ea1ef2459050a7694bff436a2e13b8 (patch) | |
tree | 34c3e3671bf0f7d8469453c004dcb74c005522b3 /tools | |
parent | 23595a59a76ae38afbbb53dd11f81fbe46ee82c1 (diff) |
Add VALIDATE_FAILURE_IS_A_TOOL_FAILURE to specify whether a failure in validation
means the tool should return failure or not. For now it is not defined, which
means any failed pixels are still reported to stdout, but the tool does not
return an error, allowing the bots to go green (until we can fix these failures).
Review URL: https://codereview.appspot.com/7105056
git-svn-id: http://skia.googlecode.com/svn/trunk@7211 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tools')
-rw-r--r-- | tools/render_pictures_main.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/render_pictures_main.cpp b/tools/render_pictures_main.cpp index 99bf7d1aa9..fda5350d3a 100644 --- a/tools/render_pictures_main.cpp +++ b/tools/render_pictures_main.cpp @@ -21,6 +21,10 @@ #include "PictureRenderer.h" #include "picture_utils.h" +// Define this if validation failures should cause the tool to return failure +// If not, it will still printf the messages. +//#define VALIDATE_FAILURE_IS_A_TOOL_FAILURE + static void usage(const char* argv0) { SkDebugf("SkPicture rendering tool\n"); SkDebugf("\n" @@ -226,12 +230,17 @@ static bool render_picture(const SkString& inputPath, const SkString* outputDir, x, y, *referenceBitmap->getAddr32(x, y), *bitmap->getAddr32(x, y)); +#ifdef VALIDATE_FAILURE_IS_A_TOOL_FAILURE SkDELETE(bitmap); SkDELETE(referenceBitmap); return false; +#else + goto DONE; +#endif } } } + DONE: SkDELETE(referenceBitmap); } |