| 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 21 matching lines...) Expand all Loading... |
| 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 kPicture_DeviceType, | 36 kPicture_DeviceType, |
| 37 #if SK_SUPPORT_GPU | 37 #if SK_SUPPORT_GPU |
| 38 kGPU_DeviceType, | 38 kGPU_DeviceType, |
| 39 #if SK_ANGLE | 39 #if SK_ANGLE |
| 40 kANGLE_DeviceType, | 40 kANGLE_DeviceType, |
| 41 #endif // SK_ANGLE | 41 #endif // SK_ANGLE |
| 42 #if SK_COMMAND_BUFFER |
| 43 kCommandBuffer_DeviceType, |
| 44 #endif // SK_COMMAND_BUFFER |
| 42 #endif // SK_SUPPORT_GPU | 45 #endif // SK_SUPPORT_GPU |
| 43 kDeviceTypeCnt | 46 kDeviceTypeCnt |
| 44 }; | 47 }; |
| 45 | 48 |
| 46 static bool IsGpuDeviceType(DeviceType devType) { | 49 static bool IsGpuDeviceType(DeviceType devType) { |
| 47 #if SK_SUPPORT_GPU | 50 #if SK_SUPPORT_GPU |
| 48 switch (devType) { | 51 switch (devType) { |
| 49 case kGPU_DeviceType: | 52 case kGPU_DeviceType: |
| 50 #if SK_ANGLE | 53 #if SK_ANGLE |
| 51 case kANGLE_DeviceType: | 54 case kANGLE_DeviceType: |
| 52 #endif // SK_ANGLE | 55 #endif // SK_ANGLE |
| 56 #if SK_COMMAND_BUFFER |
| 57 case kCommandBuffer_DeviceType: |
| 58 #endif // SK_COMMAND_BUFFER |
| 53 return true; | 59 return true; |
| 54 default: | 60 default: |
| 55 return false; | 61 return false; |
| 56 } | 62 } |
| 57 #endif // SK_SUPPORT_GPU | 63 #endif // SK_SUPPORT_GPU |
| 58 return false; | 64 return false; |
| 59 } | 65 } |
| 60 | 66 |
| 61 /** | 67 /** |
| 62 * SampleApp ports can subclass this manager class if they want to: | 68 * SampleApp ports can subclass this manager class if they want to: |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 void postAnimatingEvent(); | 235 void postAnimatingEvent(); |
| 230 int findByTitle(const char*); | 236 int findByTitle(const char*); |
| 231 void listTitles(); | 237 void listTitles(); |
| 232 SkSize tileSize() const; | 238 SkSize tileSize() const; |
| 233 bool sendAnimatePulse(); | 239 bool sendAnimatePulse(); |
| 234 | 240 |
| 235 typedef SkOSWindow INHERITED; | 241 typedef SkOSWindow INHERITED; |
| 236 }; | 242 }; |
| 237 | 243 |
| 238 #endif | 244 #endif |
| OLD | NEW |