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 15 matching lines...) Expand all Loading... |
26 #include "SkStream.h" | 26 #include "SkStream.h" |
27 #include "SkSurface.h" | 27 #include "SkSurface.h" |
28 #include "SkTemplates.h" | 28 #include "SkTemplates.h" |
29 #include "SkTSort.h" | 29 #include "SkTSort.h" |
30 #include "SkTime.h" | 30 #include "SkTime.h" |
31 #include "SkTypeface.h" | 31 #include "SkTypeface.h" |
32 #include "SkWindow.h" | 32 #include "SkWindow.h" |
33 #include "sk_tool_utils.h" | 33 #include "sk_tool_utils.h" |
34 | 34 |
35 #if SK_SUPPORT_GPU | 35 #if SK_SUPPORT_GPU |
36 # include "gl/GrGLInterface.h" | 36 #include "gl/GrGLInterface.h" |
37 # include "gl/GrGLUtil.h" | 37 #include "gl/GrGLUtil.h" |
38 # include "GrRenderTarget.h" | 38 #include "GrRenderTarget.h" |
39 # include "GrContext.h" | 39 #include "GrContext.h" |
40 # include "SkGpuDevice.h" | 40 #include "SkGpuDevice.h" |
41 # if SK_ANGLE | |
42 # include "gl/angle/GLContext_angle.h" | |
43 # endif | |
44 #else | 41 #else |
45 class GrContext; | 42 class GrContext; |
46 #endif | 43 #endif |
47 | 44 |
48 const struct { | 45 const struct { |
49 SkColorType fColorType; | 46 SkColorType fColorType; |
50 SkColorProfileType fProfileType; | 47 SkColorProfileType fProfileType; |
51 const char* fName; | 48 const char* fName; |
52 } gConfig[] = { | 49 } gConfig[] = { |
53 { kN32_SkColorType, kLinear_SkColorProfileType, "L32" }, | 50 { kN32_SkColorType, kLinear_SkColorProfileType, "L32" }, |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 SkASSERT(nullptr == fCurIntf); | 226 SkASSERT(nullptr == fCurIntf); |
230 SkAutoTUnref<const GrGLInterface> glInterface; | 227 SkAutoTUnref<const GrGLInterface> glInterface; |
231 switch (win->getDeviceType()) { | 228 switch (win->getDeviceType()) { |
232 case kRaster_DeviceType: // fallthrough | 229 case kRaster_DeviceType: // fallthrough |
233 case kGPU_DeviceType: | 230 case kGPU_DeviceType: |
234 // all these guys use the native interface | 231 // all these guys use the native interface |
235 glInterface.reset(GrGLCreateNativeInterface()); | 232 glInterface.reset(GrGLCreateNativeInterface()); |
236 break; | 233 break; |
237 #if SK_ANGLE | 234 #if SK_ANGLE |
238 case kANGLE_DeviceType: | 235 case kANGLE_DeviceType: |
239 glInterface.reset(sk_gpu_test::CreateANGLEGLInterface()); | 236 glInterface.reset(GrGLCreateANGLEInterface()); |
240 break; | 237 break; |
241 #endif // SK_ANGLE | 238 #endif // SK_ANGLE |
242 #if SK_COMMAND_BUFFER | 239 #if SK_COMMAND_BUFFER |
243 case kCommandBuffer_DeviceType: | 240 case kCommandBuffer_DeviceType: |
244 glInterface.reset(GrGLCreateCommandBufferInterface()); | 241 glInterface.reset(GrGLCreateCommandBufferInterface()); |
245 break; | 242 break; |
246 #endif // SK_COMMAND_BUFFER | 243 #endif // SK_COMMAND_BUFFER |
247 default: | 244 default: |
248 SkASSERT(false); | 245 SkASSERT(false); |
249 break; | 246 break; |
(...skipping 2083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2333 #ifdef SK_BUILD_FOR_MAC | 2330 #ifdef SK_BUILD_FOR_MAC |
2334 setenv("ANDROID_ROOT", "/android/device/data", 0); | 2331 setenv("ANDROID_ROOT", "/android/device/data", 0); |
2335 #endif | 2332 #endif |
2336 SkGraphics::Init(); | 2333 SkGraphics::Init(); |
2337 SkEvent::Init(); | 2334 SkEvent::Init(); |
2338 } | 2335 } |
2339 | 2336 |
2340 void application_term() { | 2337 void application_term() { |
2341 SkEvent::Term(); | 2338 SkEvent::Term(); |
2342 } | 2339 } |
OLD | NEW |