diff options
author | brianosman <brianosman@google.com> | 2016-07-12 09:07:33 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-12 09:07:33 -0700 |
commit | e1d2007924e7c3ec6f349c326249ba5eb9a9d70c (patch) | |
tree | 8523c55f560ec16ebd952e0c0a53c98f6505f430 /tools/viewer | |
parent | 9fd67a1f53809f5eff1210dd107241b450c48acc (diff) |
Respect --match for samples and jpgs in viewer
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2144643002
Review-Url: https://codereview.chromium.org/2144643002
Diffstat (limited to 'tools/viewer')
-rw-r--r-- | tools/viewer/Viewer.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp index ff77cc444e..e5432b0ffa 100644 --- a/tools/viewer/Viewer.cpp +++ b/tools/viewer/Viewer.cpp @@ -218,7 +218,9 @@ void Viewer::initSlides() { const SkViewRegister* reg = SkViewRegister::Head(); while (reg) { sk_sp<Slide> slide(new SampleSlide(reg->factory())); - fSlides.push_back(slide); + if (!SkCommandLineFlags::ShouldSkip(FLAGS_match, slide->getName().c_str())) { + fSlides.push_back(slide); + } reg = reg->next(); } @@ -256,6 +258,10 @@ void Viewer::initSlides() { SkOSFile::Iter it(FLAGS_jpgs[i], ".jpg"); SkString jpgName; while (it.next(&jpgName)) { + if (SkCommandLineFlags::ShouldSkip(FLAGS_match, jpgName.c_str())) { + continue; + } + SkString path = SkOSPath::Join(FLAGS_jpgs[i], jpgName.c_str()); sk_sp<ImageSlide> slide(new ImageSlide(jpgName, path)); if (slide) { |