OLD | NEW |
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 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
793 static SkTaskGroup::Enabler enabled(-1); | 793 static SkTaskGroup::Enabler enabled(-1); |
794 gSampleWindow = this; | 794 gSampleWindow = this; |
795 | 795 |
796 #ifdef PIPE_FILE | 796 #ifdef PIPE_FILE |
797 //Clear existing file or create file if it doesn't exist | 797 //Clear existing file or create file if it doesn't exist |
798 FILE* f = fopen(FILE_PATH, "wb"); | 798 FILE* f = fopen(FILE_PATH, "wb"); |
799 fclose(f); | 799 fclose(f); |
800 #endif | 800 #endif |
801 | 801 |
802 fDeviceType = kRaster_DeviceType; | 802 fDeviceType = kRaster_DeviceType; |
| 803 #if SK_SUPPORT_GPU |
803 if (FLAGS_gpu) { | 804 if (FLAGS_gpu) { |
804 fDeviceType = kGPU_DeviceType; | 805 fDeviceType = kGPU_DeviceType; |
805 } | 806 } |
806 | 807 #endif |
| 808 |
807 #if DEFAULT_TO_GPU | 809 #if DEFAULT_TO_GPU |
808 fDeviceType = kGPU_DeviceType; | 810 fDeviceType = kGPU_DeviceType; |
809 #endif | 811 #endif |
810 #if SK_ANGLE && DEFAULT_TO_ANGLE | 812 #if SK_ANGLE && DEFAULT_TO_ANGLE |
811 fDeviceType = kANGLE_DeviceType; | 813 fDeviceType = kANGLE_DeviceType; |
812 #endif | 814 #endif |
813 #if SK_COMMAND_BUFFER && DEFAULT_TO_COMMAND_BUFFER | 815 #if SK_COMMAND_BUFFER && DEFAULT_TO_COMMAND_BUFFER |
814 fDeviceType = kCommandBuffer_DeviceType; | 816 fDeviceType = kCommandBuffer_DeviceType; |
815 #endif | 817 #endif |
816 | 818 |
(...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2395 #ifdef SK_BUILD_FOR_MAC | 2397 #ifdef SK_BUILD_FOR_MAC |
2396 setenv("ANDROID_ROOT", "/android/device/data", 0); | 2398 setenv("ANDROID_ROOT", "/android/device/data", 0); |
2397 #endif | 2399 #endif |
2398 SkGraphics::Init(); | 2400 SkGraphics::Init(); |
2399 SkEvent::Init(); | 2401 SkEvent::Init(); |
2400 } | 2402 } |
2401 | 2403 |
2402 void application_term() { | 2404 void application_term() { |
2403 SkEvent::Term(); | 2405 SkEvent::Term(); |
2404 } | 2406 } |
OLD | NEW |