OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include "GrContextFactory.h" | 9 #include "GrContextFactory.h" |
10 #include "gl/GLTestContext.h" | 10 #include "gl/GLTestContext.h" |
11 | 11 |
12 #if SK_ANGLE | 12 #if SK_ANGLE |
13 #include "gl/angle/GLTestContext_angle.h" | 13 #include "gl/angle/GLTestContext_angle.h" |
14 #endif | 14 #endif |
15 #if SK_COMMAND_BUFFER | 15 #include "gl/command_buffer/GLTestContext_command_buffer.h" |
16 #include "gl/command_buffer/GLTestContext_command_buffer.h" | |
17 #endif | |
18 #include "gl/debug/DebugGLTestContext.h" | 16 #include "gl/debug/DebugGLTestContext.h" |
19 #if SK_MESA | 17 #if SK_MESA |
20 #include "gl/mesa/GLTestContext_mesa.h" | 18 #include "gl/mesa/GLTestContext_mesa.h" |
21 #endif | 19 #endif |
22 #ifdef SK_VULKAN | 20 #ifdef SK_VULKAN |
23 #include "vk/VkTestContext.h" | 21 #include "vk/VkTestContext.h" |
24 #endif | 22 #endif |
25 #include "gl/null/NullGLTestContext.h" | 23 #include "gl/null/NullGLTestContext.h" |
26 #include "gl/GrGLGpu.h" | 24 #include "gl/GrGLGpu.h" |
27 #include "GrCaps.h" | 25 #include "GrCaps.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 #if SK_ANGLE | 119 #if SK_ANGLE |
122 # ifdef SK_BUILD_FOR_WIN | 120 # ifdef SK_BUILD_FOR_WIN |
123 case kANGLE_ContextType: | 121 case kANGLE_ContextType: |
124 glCtx = CreateANGLEDirect3DGLTestContext(); | 122 glCtx = CreateANGLEDirect3DGLTestContext(); |
125 break; | 123 break; |
126 # endif | 124 # endif |
127 case kANGLE_GL_ContextType: | 125 case kANGLE_GL_ContextType: |
128 glCtx = CreateANGLEOpenGLGLTestContext(); | 126 glCtx = CreateANGLEOpenGLGLTestContext(); |
129 break; | 127 break; |
130 #endif | 128 #endif |
131 #if SK_COMMAND_BUFFER | |
132 case kCommandBuffer_ContextType: | 129 case kCommandBuffer_ContextType: |
133 glCtx = CommandBufferGLTestContext::Create(); | 130 glCtx = CommandBufferGLTestContext::Create(); |
134 break; | 131 break; |
135 #endif | |
136 #if SK_MESA | 132 #if SK_MESA |
137 case kMESA_ContextType: | 133 case kMESA_ContextType: |
138 glCtx = CreateMesaGLTestContext(); | 134 glCtx = CreateMesaGLTestContext(); |
139 break; | 135 break; |
140 #endif | 136 #endif |
141 case kNullGL_ContextType: | 137 case kNullGL_ContextType: |
142 glCtx = CreateNullGLTestContext(ContextOptions::kEnableNVPR
& options); | 138 glCtx = CreateNullGLTestContext(ContextOptions::kEnableNVPR
& options); |
143 break; | 139 break; |
144 case kDebugGL_ContextType: | 140 case kDebugGL_ContextType: |
145 glCtx = CreateDebugGLTestContext(); | 141 glCtx = CreateDebugGLTestContext(); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 Context& context = fContexts.push_back(); | 214 Context& context = fContexts.push_back(); |
219 context.fBackend = backend; | 215 context.fBackend = backend; |
220 context.fTestContext = testCtx.release(); | 216 context.fTestContext = testCtx.release(); |
221 context.fGrContext = SkRef(grCtx.get()); | 217 context.fGrContext = SkRef(grCtx.get()); |
222 context.fType = type; | 218 context.fType = type; |
223 context.fOptions = options; | 219 context.fOptions = options; |
224 context.fAbandoned = false; | 220 context.fAbandoned = false; |
225 return ContextInfo(context.fBackend, context.fTestContext, context.fGrContex
t); | 221 return ContextInfo(context.fBackend, context.fTestContext, context.fGrContex
t); |
226 } | 222 } |
227 } // namespace sk_gpu_test | 223 } // namespace sk_gpu_test |
OLD | NEW |