| 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 class SampleWindow : public SkOSWindow { | 31 class SampleWindow : public SkOSWindow { |
| 32 SkTDArray<const SkViewFactory*> fSamples; | 32 SkTDArray<const SkViewFactory*> fSamples; |
| 33 public: | 33 public: |
| 34 enum DeviceType { | 34 enum DeviceType { |
| 35 kRaster_DeviceType, | 35 kRaster_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 #if SK_COMMAND_BUFFER | |
| 42 kCommandBuffer_DeviceType, | |
| 43 #endif // SK_COMMAND_BUFFER | |
| 44 #endif // SK_SUPPORT_GPU | 41 #endif // SK_SUPPORT_GPU |
| 45 kDeviceTypeCnt | 42 kDeviceTypeCnt |
| 46 }; | 43 }; |
| 47 | 44 |
| 48 static bool IsGpuDeviceType(DeviceType devType) { | 45 static bool IsGpuDeviceType(DeviceType devType) { |
| 49 #if SK_SUPPORT_GPU | 46 #if SK_SUPPORT_GPU |
| 50 switch (devType) { | 47 switch (devType) { |
| 51 case kGPU_DeviceType: | 48 case kGPU_DeviceType: |
| 52 #if SK_ANGLE | 49 #if SK_ANGLE |
| 53 case kANGLE_DeviceType: | 50 case kANGLE_DeviceType: |
| 54 #endif // SK_ANGLE | 51 #endif // SK_ANGLE |
| 55 #if SK_COMMAND_BUFFER | |
| 56 case kCommandBuffer_DeviceType: | |
| 57 #endif // SK_COMMAND_BUFFER | |
| 58 return true; | 52 return true; |
| 59 default: | 53 default: |
| 60 return false; | 54 return false; |
| 61 } | 55 } |
| 62 #endif // SK_SUPPORT_GPU | 56 #endif // SK_SUPPORT_GPU |
| 63 return false; | 57 return false; |
| 64 } | 58 } |
| 65 | 59 |
| 66 /** | 60 /** |
| 67 * SampleApp ports can subclass this manager class if they want to: | 61 * SampleApp ports can subclass this manager class if they want to: |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 void postAnimatingEvent(); | 232 void postAnimatingEvent(); |
| 239 int findByTitle(const char*); | 233 int findByTitle(const char*); |
| 240 void listTitles(); | 234 void listTitles(); |
| 241 SkSize tileSize() const; | 235 SkSize tileSize() const; |
| 242 bool sendAnimatePulse(); | 236 bool sendAnimatePulse(); |
| 243 | 237 |
| 244 typedef SkOSWindow INHERITED; | 238 typedef SkOSWindow INHERITED; |
| 245 }; | 239 }; |
| 246 | 240 |
| 247 #endif | 241 #endif |
| OLD | NEW |