Add ShouldSkip variant that can read a --match flag directly.
Just seemed like we were going through lots of hoops for this common case.
BUG=
R=scroggo@google.com
Author: mtklein@google.com
Review URL: https://chromiumcodereview.appspot.com/23708009
git-svn-id: http://skia.googlecode.com/svn/trunk@11034 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index 6fd96f9..c24d9c7 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -2093,13 +2093,6 @@
return true;
}
-static bool parse_flags_match_strs(SkTDArray<const char*>* matchStrs) {
- for (int i = 0; i < FLAGS_match.count(); ++i) {
- matchStrs->push(FLAGS_match[i]);
- }
- return true;
-}
-
static bool parse_flags_resource_path() {
if (FLAGS_resourcePath.count() == 1) {
GM::SetResourcePath(FLAGS_resourcePath[0]);
@@ -2145,7 +2138,6 @@
#else
GrContextFactory* grFactory = NULL;
#endif
- SkTDArray<const char*> matchStrs;
if (!parse_flags_modulo(&moduloRemainder, &moduloDivisor) ||
!parse_flags_ignore_error_types(&gmmain.fIgnorableErrorTypes) ||
@@ -2154,7 +2146,6 @@
#endif
!parse_flags_tile_grid_replay_scales(&tileGridReplayScales) ||
!parse_flags_resource_path() ||
- !parse_flags_match_strs(&matchStrs) ||
!parse_flags_jpeg_quality() ||
!parse_flags_configs(&configs, grFactory) ||
!parse_flags_pdf_rasterizers(configs, &pdfRasterizers) ||
@@ -2219,7 +2210,7 @@
const char* shortName = gm->shortName();
- if (SkCommandLineFlags::ShouldSkip(matchStrs, shortName)) {
+ if (SkCommandLineFlags::ShouldSkip(FLAGS_match, shortName)) {
continue;
}