aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
diff options
context:
space:
mode:
authorGravatar jvanverth <jvanverth@google.com>2015-10-02 09:12:05 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-10-02 09:12:05 -0700
commit44dcb8a84bcced3a42609ecb4abac1f3e7cc6cbe (patch)
tree71ea56128998b5d513b83faa40bb2ff178ca5495 /samplecode
parenta7e878064509ef96b54d5507dab0b50def66dc13 (diff)
Some iOS fixes to make SampleApp work better.
Changes: - Rebuild argc and argv so we can process command line arguments - Remove unnecessary SimpleiOSApp files - Add support for reading files from the app bundle - Add gpu flag so we can start up directly into OpenGL Review URL: https://codereview.chromium.org/1382943004
Diffstat (limited to 'samplecode')
-rw-r--r--samplecode/SampleApp.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index 02c5e036a1..c891508329 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;