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
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index 02c5e03..c891508 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -711,6 +711,7 @@
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 @@
#endif
fDeviceType = kRaster_DeviceType;
+ if (FLAGS_gpu) {
+ fDeviceType = kGPU_DeviceType;
+ }
#if DEFAULT_TO_GPU
fDeviceType = kGPU_DeviceType;