OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Skia | 2 * Copyright 2011 Skia |
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 #ifndef SampleApp_DEFINED | 8 #ifndef SampleApp_DEFINED |
9 #define SampleApp_DEFINED | 9 #define SampleApp_DEFINED |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 SkTDArray<const SkViewFactory*> fSamples; | 31 SkTDArray<const SkViewFactory*> fSamples; |
32 public: | 32 public: |
33 enum DeviceType { | 33 enum DeviceType { |
34 kRaster_DeviceType, | 34 kRaster_DeviceType, |
35 kPicture_DeviceType, | 35 kPicture_DeviceType, |
36 #if SK_SUPPORT_GPU | 36 #if SK_SUPPORT_GPU |
37 kGPU_DeviceType, | 37 kGPU_DeviceType, |
38 #if SK_ANGLE | 38 #if SK_ANGLE |
39 kANGLE_DeviceType, | 39 kANGLE_DeviceType, |
40 #endif // SK_ANGLE | 40 #endif // SK_ANGLE |
41 kNullGPU_DeviceType, | |
42 #endif // SK_SUPPORT_GPU | 41 #endif // SK_SUPPORT_GPU |
43 | 42 |
44 kDeviceTypeCnt | 43 kDeviceTypeCnt |
45 }; | 44 }; |
46 | 45 |
47 static bool IsGpuDeviceType(DeviceType devType) { | 46 static bool IsGpuDeviceType(DeviceType devType) { |
48 #if SK_SUPPORT_GPU | 47 #if SK_SUPPORT_GPU |
49 switch (devType) { | 48 switch (devType) { |
50 case kGPU_DeviceType: | 49 case kGPU_DeviceType: |
51 #if SK_ANGLE | 50 #if SK_ANGLE |
52 case kANGLE_DeviceType: | 51 case kANGLE_DeviceType: |
53 #endif // SK_ANGLE | 52 #endif // SK_ANGLE |
54 case kNullGPU_DeviceType: | |
55 return true; | 53 return true; |
56 default: | 54 default: |
57 return false; | 55 return false; |
58 } | 56 } |
59 #endif // SK_SUPPORT_GPU | 57 #endif // SK_SUPPORT_GPU |
60 return false; | 58 return false; |
61 } | 59 } |
62 | 60 |
63 /** | 61 /** |
64 * SampleApp ports can subclass this manager class if they want to: | 62 * SampleApp ports can subclass this manager class if they want to: |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 void installDrawFilter(SkCanvas*); | 233 void installDrawFilter(SkCanvas*); |
236 int findByTitle(const char*); | 234 int findByTitle(const char*); |
237 void listTitles(); | 235 void listTitles(); |
238 SkSize tileSize() const; | 236 SkSize tileSize() const; |
239 bool sendAnimatePulse(); | 237 bool sendAnimatePulse(); |
240 | 238 |
241 typedef SkOSWindow INHERITED; | 239 typedef SkOSWindow INHERITED; |
242 }; | 240 }; |
243 | 241 |
244 #endif | 242 #endif |
OLD | NEW |