SampleApp - reduce unnecessary verbosity [with --picture $path]

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
This commit is contained in:
halcanary@google.com 2013-10-14 12:47:37 +00:00
parent ddf94cf108
commit 805ca19625

View 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);