SampleApp - reduce unnecessary verbosity [with --picture $path]
authorhalcanary@google.com <halcanary@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 14 Oct 2013 12:47:37 +0000 (12:47 +0000)
committerhalcanary@google.com <halcanary@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 14 Oct 2013 12:47:37 +0000 (12:47 +0000)
Before this change, `SampleApp --picture $path` prints out usage (as
well as --pictureDir) as if there was a syntax error in the command
line arguments.

BUG=skia:1677
R=reed@google.com

Review URL: https://codereview.chromium.org/24503003

git-svn-id: http://skia.googlecode.com/svn/trunk@11748 2bbb7eff-a529-9590-31e7-b0007b416f81

samplecode/SampleApp.cpp

index f303794..f044e70 100644 (file)
@@ -790,6 +790,10 @@ SampleWindow::SampleWindow(void* hwnd, int argc, char** argv, DeviceManager* dev
             }
         } else if (strcmp(*argv, "--list") == 0) {
             listTitles();
+        } else if (strcmp(*argv, "--pictureDir") == 0) {
+            ++argv;  // This case is dealt with in registerPictFileSamples().
+        } else if (strcmp(*argv, "--picture") == 0) {
+            ++argv;  // This case is dealt with in registerPictFileSample().
         }
         else {
             usage(commandName);