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 20 matching lines...) Expand all Loading... | |
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 #include "gl/angle/GLContext_angle.h" | |
jvanverth1
2016/03/28 20:26:35
Place inside #if SK_ANGLE block?
bsalomon
2016/03/28 20:46:25
Will do
| |
41 #else | 42 #else |
42 class GrContext; | 43 class GrContext; |
43 #endif | 44 #endif |
44 | 45 |
45 const struct { | 46 const struct { |
46 SkColorType fColorType; | 47 SkColorType fColorType; |
47 SkColorProfileType fProfileType; | 48 SkColorProfileType fProfileType; |
48 const char* fName; | 49 const char* fName; |
49 } gConfig[] = { | 50 } gConfig[] = { |
50 { kN32_SkColorType, kLinear_SkColorProfileType, "L32" }, | 51 { kN32_SkColorType, kLinear_SkColorProfileType, "L32" }, |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
226 SkASSERT(nullptr == fCurIntf); | 227 SkASSERT(nullptr == fCurIntf); |
227 SkAutoTUnref<const GrGLInterface> glInterface; | 228 SkAutoTUnref<const GrGLInterface> glInterface; |
228 switch (win->getDeviceType()) { | 229 switch (win->getDeviceType()) { |
229 case kRaster_DeviceType: // fallthrough | 230 case kRaster_DeviceType: // fallthrough |
230 case kGPU_DeviceType: | 231 case kGPU_DeviceType: |
231 // all these guys use the native interface | 232 // all these guys use the native interface |
232 glInterface.reset(GrGLCreateNativeInterface()); | 233 glInterface.reset(GrGLCreateNativeInterface()); |
233 break; | 234 break; |
234 #if SK_ANGLE | 235 #if SK_ANGLE |
235 case kANGLE_DeviceType: | 236 case kANGLE_DeviceType: |
236 glInterface.reset(GrGLCreateANGLEInterface()); | 237 glInterface.reset(sk_gpu_test::CreateANGLEGLInterface()); |
237 break; | 238 break; |
238 #endif // SK_ANGLE | 239 #endif // SK_ANGLE |
239 #if SK_COMMAND_BUFFER | 240 #if SK_COMMAND_BUFFER |
240 case kCommandBuffer_DeviceType: | 241 case kCommandBuffer_DeviceType: |
241 glInterface.reset(GrGLCreateCommandBufferInterface()); | 242 glInterface.reset(GrGLCreateCommandBufferInterface()); |
242 break; | 243 break; |
243 #endif // SK_COMMAND_BUFFER | 244 #endif // SK_COMMAND_BUFFER |
244 default: | 245 default: |
245 SkASSERT(false); | 246 SkASSERT(false); |
246 break; | 247 break; |
(...skipping 2083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2330 #ifdef SK_BUILD_FOR_MAC | 2331 #ifdef SK_BUILD_FOR_MAC |
2331 setenv("ANDROID_ROOT", "/android/device/data", 0); | 2332 setenv("ANDROID_ROOT", "/android/device/data", 0); |
2332 #endif | 2333 #endif |
2333 SkGraphics::Init(); | 2334 SkGraphics::Init(); |
2334 SkEvent::Init(); | 2335 SkEvent::Init(); |
2335 } | 2336 } |
2336 | 2337 |
2337 void application_term() { | 2338 void application_term() { |
2338 SkEvent::Term(); | 2339 SkEvent::Term(); |
2339 } | 2340 } |
OLD | NEW |