Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Unified Diff: tools/viewer/Viewer.cpp

Issue 2144643002: Respect --match for samples and jpgs in viewer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698