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" |
jvanverth1
2016/03/29 17:21:15
Not sure if you intended this indenting.
bsalomon
2016/03/29 17:32:04
I did, but can revert it. DM (or some other tool c
| |
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 | |
41 #else | 44 #else |
42 class GrContext; | 45 class GrContext; |
43 #endif | 46 #endif |
44 | 47 |
45 const struct { | 48 const struct { |
46 SkColorType fColorType; | 49 SkColorType fColorType; |
47 SkColorProfileType fProfileType; | 50 SkColorProfileType fProfileType; |
48 const char* fName; | 51 const char* fName; |
49 } gConfig[] = { | 52 } gConfig[] = { |
50 { kN32_SkColorType, kLinear_SkColorProfileType, "L32" }, | 53 { kN32_SkColorType, kLinear_SkColorProfileType, "L32" }, |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
226 SkASSERT(nullptr == fCurIntf); | 229 SkASSERT(nullptr == fCurIntf); |
227 SkAutoTUnref<const GrGLInterface> glInterface; | 230 SkAutoTUnref<const GrGLInterface> glInterface; |
228 switch (win->getDeviceType()) { | 231 switch (win->getDeviceType()) { |
229 case kRaster_DeviceType: // fallthrough | 232 case kRaster_DeviceType: // fallthrough |
230 case kGPU_DeviceType: | 233 case kGPU_DeviceType: |
231 // all these guys use the native interface | 234 // all these guys use the native interface |
232 glInterface.reset(GrGLCreateNativeInterface()); | 235 glInterface.reset(GrGLCreateNativeInterface()); |
233 break; | 236 break; |
234 #if SK_ANGLE | 237 #if SK_ANGLE |
235 case kANGLE_DeviceType: | 238 case kANGLE_DeviceType: |
236 glInterface.reset(GrGLCreateANGLEInterface()); | 239 glInterface.reset(sk_gpu_test::CreateANGLEGLInterface()); |
237 break; | 240 break; |
238 #endif // SK_ANGLE | 241 #endif // SK_ANGLE |
239 #if SK_COMMAND_BUFFER | 242 #if SK_COMMAND_BUFFER |
240 case kCommandBuffer_DeviceType: | 243 case kCommandBuffer_DeviceType: |
241 glInterface.reset(GrGLCreateCommandBufferInterface()); | 244 glInterface.reset(GrGLCreateCommandBufferInterface()); |
242 break; | 245 break; |
243 #endif // SK_COMMAND_BUFFER | 246 #endif // SK_COMMAND_BUFFER |
244 default: | 247 default: |
245 SkASSERT(false); | 248 SkASSERT(false); |
246 break; | 249 break; |
(...skipping 2083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2330 #ifdef SK_BUILD_FOR_MAC | 2333 #ifdef SK_BUILD_FOR_MAC |
2331 setenv("ANDROID_ROOT", "/android/device/data", 0); | 2334 setenv("ANDROID_ROOT", "/android/device/data", 0); |
2332 #endif | 2335 #endif |
2333 SkGraphics::Init(); | 2336 SkGraphics::Init(); |
2334 SkEvent::Init(); | 2337 SkEvent::Init(); |
2335 } | 2338 } |
2336 | 2339 |
2337 void application_term() { | 2340 void application_term() { |
2338 SkEvent::Term(); | 2341 SkEvent::Term(); |
2339 } | 2342 } |
OLD | NEW |