| 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" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 case kOpenGL_GrBackend: { | 110 case kOpenGL_GrBackend: { |
| 111 GLTestContext* glCtx; | 111 GLTestContext* glCtx; |
| 112 switch (type) { | 112 switch (type) { |
| 113 case kGL_ContextType: | 113 case kGL_ContextType: |
| 114 glCtx = CreatePlatformGLTestContext(kGL_GrGLStandard); | 114 glCtx = CreatePlatformGLTestContext(kGL_GrGLStandard); |
| 115 break; | 115 break; |
| 116 case kGLES_ContextType: | 116 case kGLES_ContextType: |
| 117 glCtx = CreatePlatformGLTestContext(kGLES_GrGLStandard); | 117 glCtx = CreatePlatformGLTestContext(kGLES_GrGLStandard); |
| 118 break; | 118 break; |
| 119 #if SK_ANGLE | 119 #if SK_ANGLE |
| 120 case kANGLE_D3D9_ES2_ContextType: | 120 # ifdef SK_BUILD_FOR_WIN |
| 121 glCtx = CreateANGLETestContext(ANGLEBackend::kD3D9, ANGLECon
textVersion::kES2); | 121 case kANGLE_ContextType: |
| 122 glCtx = CreateANGLEDirect3DGLTestContext(); |
| 122 break; | 123 break; |
| 123 case kANGLE_D3D11_ES2_ContextType: | 124 # endif |
| 124 glCtx = CreateANGLETestContext(ANGLEBackend::kD3D11, | 125 case kANGLE_GL_ContextType: |
| 125 ANGLEContextVersion::kES2); | 126 glCtx = CreateANGLEOpenGLGLTestContext(); |
| 126 break; | |
| 127 case kANGLE_D3D11_ES3_ContextType: | |
| 128 glCtx = CreateANGLETestContext(ANGLEBackend::kD3D11, | |
| 129 ANGLEContextVersion::kES3); | |
| 130 break; | |
| 131 case kANGLE_GL_ES2_ContextType: | |
| 132 glCtx = CreateANGLETestContext(ANGLEBackend::kOpenGL, | |
| 133 ANGLEContextVersion::kES2); | |
| 134 break; | |
| 135 case kANGLE_GL_ES3_ContextType: | |
| 136 glCtx = CreateANGLETestContext(ANGLEBackend::kOpenGL, | |
| 137 ANGLEContextVersion::kES3); | |
| 138 break; | 127 break; |
| 139 #endif | 128 #endif |
| 140 case kCommandBuffer_ContextType: | 129 case kCommandBuffer_ContextType: |
| 141 glCtx = CommandBufferGLTestContext::Create(); | 130 glCtx = CommandBufferGLTestContext::Create(); |
| 142 break; | 131 break; |
| 143 #if SK_MESA | 132 #if SK_MESA |
| 144 case kMESA_ContextType: | 133 case kMESA_ContextType: |
| 145 glCtx = CreateMesaGLTestContext(); | 134 glCtx = CreateMesaGLTestContext(); |
| 146 break; | 135 break; |
| 147 #endif | 136 #endif |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 Context& context = fContexts.push_back(); | 214 Context& context = fContexts.push_back(); |
| 226 context.fBackend = backend; | 215 context.fBackend = backend; |
| 227 context.fTestContext = testCtx.release(); | 216 context.fTestContext = testCtx.release(); |
| 228 context.fGrContext = SkRef(grCtx.get()); | 217 context.fGrContext = SkRef(grCtx.get()); |
| 229 context.fType = type; | 218 context.fType = type; |
| 230 context.fOptions = options; | 219 context.fOptions = options; |
| 231 context.fAbandoned = false; | 220 context.fAbandoned = false; |
| 232 return ContextInfo(context.fBackend, context.fTestContext, context.fGrContex
t); | 221 return ContextInfo(context.fBackend, context.fTestContext, context.fGrContex
t); |
| 233 } | 222 } |
| 234 } // namespace sk_gpu_test | 223 } // namespace sk_gpu_test |
| OLD | NEW |