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