diff options
author | Chris Dalton <csmartdalton@google.com> | 2017-08-15 15:43:08 -0600 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-08-15 23:30:28 +0000 |
commit | ecf78acaa0d5319adf575e6f624993b16d83824c (patch) | |
tree | 69aadfc4ae9ae25f196cdde0c94b340cb274e3bd /dm | |
parent | 25954b64c066b143819bc720b20a9b4287042ecc (diff) |
Blacklist svgparse_* svgs on non-8888
This also required extending the blacklist argument to support
negative matching and wildcards.
Bug: skia:6918
Change-Id: I915e305c75fe23fc3e11c2dd3e91570967da0aaa
Reviewed-on: https://skia-review.googlesource.com/31444
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Diffstat (limited to 'dm')
-rw-r--r-- | dm/DM.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -72,9 +72,12 @@ DEFINE_string(matrix, "1 0 0 1", DEFINE_bool(gpu_threading, false, "Allow GPU work to run on multiple threads?"); DEFINE_string(blacklist, "", - "Space-separated config/src/srcOptions/name quadruples to blacklist. '_' matches anything. E.g. \n" + "Space-separated config/src/srcOptions/name quadruples to blacklist. " + "'_' matches anything. '~' negates the match. E.g. \n" "'--blacklist gpu skp _ _' will blacklist all SKPs drawn into the gpu config.\n" - "'--blacklist gpu skp _ _ 8888 gm _ aarects' will also blacklist the aarects GM on 8888."); + "'--blacklist gpu skp _ _ 8888 gm _ aarects' will also blacklist the aarects GM on 8888.\n" + "'--blacklist ~8888 svg _ svgparse_' blocks non-8888 SVGs that contain \"svgparse_\" in " + "the name."); DEFINE_string2(readPath, r, "", "If set check for equality with golden results in this directory."); @@ -1030,7 +1033,13 @@ static bool dump_png(SkBitmap bitmap, const char* path, const char* md5) { } static bool match(const char* needle, const char* haystack) { - return 0 == strcmp("_", needle) || nullptr != strstr(haystack, needle); + if ('~' == needle[0]) { + return !match(needle + 1, haystack); + } + if (0 == strcmp("_", needle)) { + return true; + } + return nullptr != strstr(haystack, needle); } static bool is_blacklisted(const char* sink, const char* src, |