Index: tools/viewer/Viewer.cpp |
diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp |
index ff77cc444ef569d5c7864e61fcbdf8bd69b4da21..e5432b0ffa4c05f2b67f9689097642d7613e61b1 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) { |