| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "CrashHandler.h" | 8 #include "CrashHandler.h" |
| 9 #include "DMJsonWriter.h" | 9 #include "DMJsonWriter.h" |
| 10 #include "DMSrcSink.h" | 10 #include "DMSrcSink.h" |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 } | 346 } |
| 347 } | 347 } |
| 348 } | 348 } |
| 349 | 349 |
| 350 static bool match(const char* needle, const char* haystack) { | 350 static bool match(const char* needle, const char* haystack) { |
| 351 return 0 == strcmp("_", needle) || NULL != strstr(haystack, needle); | 351 return 0 == strcmp("_", needle) || NULL != strstr(haystack, needle); |
| 352 } | 352 } |
| 353 | 353 |
| 354 static ImplicitString is_blacklisted(const char* sink, const char* src, | 354 static ImplicitString is_blacklisted(const char* sink, const char* src, |
| 355 const char* srcOptions, const char* name) { | 355 const char* srcOptions, const char* name) { |
| 356 for (int i = 0; i < FLAGS_blacklist.count() - 2; i += 4) { | 356 for (int i = 0; i < FLAGS_blacklist.count() - 3; i += 4) { |
| 357 if (match(FLAGS_blacklist[i+0], sink) && | 357 if (match(FLAGS_blacklist[i+0], sink) && |
| 358 match(FLAGS_blacklist[i+1], src) && | 358 match(FLAGS_blacklist[i+1], src) && |
| 359 match(FLAGS_blacklist[i+2], srcOptions) && | 359 match(FLAGS_blacklist[i+2], srcOptions) && |
| 360 match(FLAGS_blacklist[i+3], name)) { | 360 match(FLAGS_blacklist[i+3], name)) { |
| 361 return SkStringPrintf("%s %s %s %s", | 361 return SkStringPrintf("%s %s %s %s", |
| 362 FLAGS_blacklist[i+0], FLAGS_blacklist[i+1], | 362 FLAGS_blacklist[i+0], FLAGS_blacklist[i+1], |
| 363 FLAGS_blacklist[i+2], FLAGS_blacklist[i+3]); | 363 FLAGS_blacklist[i+2], FLAGS_blacklist[i+3]); |
| 364 } | 364 } |
| 365 } | 365 } |
| 366 return ""; | 366 return ""; |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 678 } | 678 } |
| 679 return 0; | 679 return 0; |
| 680 } | 680 } |
| 681 | 681 |
| 682 #if !defined(SK_BUILD_FOR_IOS) | 682 #if !defined(SK_BUILD_FOR_IOS) |
| 683 int main(int argc, char** argv) { | 683 int main(int argc, char** argv) { |
| 684 SkCommandLineFlags::Parse(argc, argv); | 684 SkCommandLineFlags::Parse(argc, argv); |
| 685 return dm_main(); | 685 return dm_main(); |
| 686 } | 686 } |
| 687 #endif | 687 #endif |
| OLD | NEW |