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

Unified Diff: bench/nanobench.cpp

Issue 1611323004: Treat bad values passed to --images as a fatal error (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove duplicate gyp fixes that are not needed Created 4 years, 11 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 | dm/DM.cpp » ('j') | gyp/codec.gyp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/nanobench.cpp
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index d6c4c596c1a6d59fb5e4a0242f8be7d3fd7f762b..1e9a88af4928b03a14aba34a6e13a573f1edcdae 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -603,19 +603,8 @@ public:
fUseMPDs.push_back() = false;
// Prepare the images for decoding
- for (int i = 0; i < FLAGS_images.count(); i++) {
- const char* flag = FLAGS_images[i];
- if (sk_isdir(flag)) {
- // If the value passed in is a directory, add all the images
- SkOSFile::Iter it(flag);
- SkString file;
- while (it.next(&file)) {
- fImages.push_back() = SkOSPath::Join(flag, file.c_str());
- }
- } else if (sk_exists(flag)) {
- // Also add the value if it is a single image
- fImages.push_back() = flag;
- }
+ if (!CollectImages(&fImages)) {
+ exit(1);
}
// Choose the candidate color types for image decoding
« no previous file with comments | « no previous file | dm/DM.cpp » ('j') | gyp/codec.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698