Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Side by Side Diff: samplecode/SampleApp.cpp

Issue 1382943004: Some iOS fixes to make SampleApp work better. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add missing comma Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gyp/SampleApp.gyp ('k') | src/ports/SkOSFile_stdio.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SampleApp.h" 8 #include "SampleApp.h"
9 9
10 #include "OverView.h" 10 #include "OverView.h"
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 static bool compareSampleTitle(const SkViewFactory* first, const SkViewFactory* second) { 704 static bool compareSampleTitle(const SkViewFactory* first, const SkViewFactory* second) {
705 return strcmp(getSampleTitle(first).c_str(), getSampleTitle(second).c_str()) < 0; 705 return strcmp(getSampleTitle(first).c_str(), getSampleTitle(second).c_str()) < 0;
706 } 706 }
707 707
708 DEFINE_string(slide, "", "Start on this sample."); 708 DEFINE_string(slide, "", "Start on this sample.");
709 DEFINE_int32(msaa, 0, "Request multisampling with this count."); 709 DEFINE_int32(msaa, 0, "Request multisampling with this count.");
710 DEFINE_string(pictureDir, "", "Read pictures from here."); 710 DEFINE_string(pictureDir, "", "Read pictures from here.");
711 DEFINE_string(picture, "", "Path to single picture."); 711 DEFINE_string(picture, "", "Path to single picture.");
712 DEFINE_bool(sort, false, "Sort samples by title."); 712 DEFINE_bool(sort, false, "Sort samples by title.");
713 DEFINE_bool(list, false, "List samples?"); 713 DEFINE_bool(list, false, "List samples?");
714 DEFINE_bool(gpu, false, "Start up with gpu?");
714 DEFINE_string(key, "", ""); // dummy to enable gm tests that have platform-spec ific names 715 DEFINE_string(key, "", ""); // dummy to enable gm tests that have platform-spec ific names
715 #ifdef SAMPLE_PDF_FILE_VIEWER 716 #ifdef SAMPLE_PDF_FILE_VIEWER
716 DEFINE_string(pdfPath, "", "Path to direcotry of pdf files."); 717 DEFINE_string(pdfPath, "", "Path to direcotry of pdf files.");
717 #endif 718 #endif
718 719
719 #include "SkTaskGroup.h" 720 #include "SkTaskGroup.h"
720 721
721 SampleWindow::SampleWindow(void* hwnd, int argc, char** argv, DeviceManager* dev Manager) 722 SampleWindow::SampleWindow(void* hwnd, int argc, char** argv, DeviceManager* dev Manager)
722 : INHERITED(hwnd) 723 : INHERITED(hwnd)
723 , fDevManager(nullptr) { 724 , fDevManager(nullptr) {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 static SkTaskGroup::Enabler enabled(-1); 793 static SkTaskGroup::Enabler enabled(-1);
793 gSampleWindow = this; 794 gSampleWindow = this;
794 795
795 #ifdef PIPE_FILE 796 #ifdef PIPE_FILE
796 //Clear existing file or create file if it doesn't exist 797 //Clear existing file or create file if it doesn't exist
797 FILE* f = fopen(FILE_PATH, "wb"); 798 FILE* f = fopen(FILE_PATH, "wb");
798 fclose(f); 799 fclose(f);
799 #endif 800 #endif
800 801
801 fDeviceType = kRaster_DeviceType; 802 fDeviceType = kRaster_DeviceType;
803 if (FLAGS_gpu) {
804 fDeviceType = kGPU_DeviceType;
805 }
802 806
803 #if DEFAULT_TO_GPU 807 #if DEFAULT_TO_GPU
804 fDeviceType = kGPU_DeviceType; 808 fDeviceType = kGPU_DeviceType;
805 #endif 809 #endif
806 #if SK_ANGLE && DEFAULT_TO_ANGLE 810 #if SK_ANGLE && DEFAULT_TO_ANGLE
807 fDeviceType = kANGLE_DeviceType; 811 fDeviceType = kANGLE_DeviceType;
808 #endif 812 #endif
809 #if SK_COMMAND_BUFFER && DEFAULT_TO_COMMAND_BUFFER 813 #if SK_COMMAND_BUFFER && DEFAULT_TO_COMMAND_BUFFER
810 fDeviceType = kCommandBuffer_DeviceType; 814 fDeviceType = kCommandBuffer_DeviceType;
811 #endif 815 #endif
(...skipping 1579 matching lines...) Expand 10 before | Expand all | Expand 10 after
2391 #ifdef SK_BUILD_FOR_MAC 2395 #ifdef SK_BUILD_FOR_MAC
2392 setenv("ANDROID_ROOT", "/android/device/data", 0); 2396 setenv("ANDROID_ROOT", "/android/device/data", 0);
2393 #endif 2397 #endif
2394 SkGraphics::Init(); 2398 SkGraphics::Init();
2395 SkEvent::Init(); 2399 SkEvent::Init();
2396 } 2400 }
2397 2401
2398 void application_term() { 2402 void application_term() {
2399 SkEvent::Term(); 2403 SkEvent::Term();
2400 } 2404 }
OLDNEW
« no previous file with comments | « gyp/SampleApp.gyp ('k') | src/ports/SkOSFile_stdio.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698