if you use --picture in SampleApp, make that sample come up first

git-svn-id: http://skia.googlecode.com/svn/trunk@9455 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2013-06-06 13:14:13 +00:00
parent fb62522960
commit 7d05ac9508

View File

@ -702,6 +702,8 @@ SampleWindow::SampleWindow(void* hwnd, int argc, char** argv, DeviceManager* dev
: INHERITED(hwnd) : INHERITED(hwnd)
, fDevManager(NULL) { , fDevManager(NULL) {
fCurrIndex = -1;
this->registerPictFileSamples(argv, argc); this->registerPictFileSamples(argv, argc);
this->registerPictFileSample(argv, argc); this->registerPictFileSample(argv, argc);
SkGMRegistyToSampleRegistry(); SkGMRegistyToSampleRegistry();
@ -714,7 +716,6 @@ SampleWindow::SampleWindow(void* hwnd, int argc, char** argv, DeviceManager* dev
} }
const char* resourcePath = NULL; const char* resourcePath = NULL;
fCurrIndex = -1;
fMSAASampleCount = 0; fMSAASampleCount = 0;
const char* const commandName = argv[0]; const char* const commandName = argv[0];
@ -940,6 +941,7 @@ void SampleWindow::registerPictFileSample(char** argv, int argc) {
} }
if (pict) { if (pict) {
SkString path(pict); SkString path(pict);
fCurrIndex = fSamples.count();
*fSamples.append() = new PictFileFactory(path); *fSamples.append() = new PictFileFactory(path);
} }
} }