Index: samplecode/SampleApp.cpp |
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp |
index 02c5e036a1779f9f01c58d9d9bcf6080838aad44..c891508329fcff14daba9b452d276f9251117e6a 100644 |
--- a/samplecode/SampleApp.cpp |
+++ b/samplecode/SampleApp.cpp |
@@ -711,6 +711,7 @@ DEFINE_string(pictureDir, "", "Read pictures from here."); |
DEFINE_string(picture, "", "Path to single picture."); |
DEFINE_bool(sort, false, "Sort samples by title."); |
DEFINE_bool(list, false, "List samples?"); |
+DEFINE_bool(gpu, false, "Start up with gpu?"); |
DEFINE_string(key, "", ""); // dummy to enable gm tests that have platform-specific names |
#ifdef SAMPLE_PDF_FILE_VIEWER |
DEFINE_string(pdfPath, "", "Path to direcotry of pdf files."); |
@@ -799,6 +800,9 @@ SampleWindow::SampleWindow(void* hwnd, int argc, char** argv, DeviceManager* dev |
#endif |
fDeviceType = kRaster_DeviceType; |
+ if (FLAGS_gpu) { |
+ fDeviceType = kGPU_DeviceType; |
+ } |
#if DEFAULT_TO_GPU |
fDeviceType = kGPU_DeviceType; |