| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 case kCommandBuffer_ContextType: | 134 case kCommandBuffer_ContextType: |
| 135 glCtx.reset(CommandBufferGLTestContext::Create()); | 135 glCtx.reset(CommandBufferGLTestContext::Create()); |
| 136 break; | 136 break; |
| 137 #endif | 137 #endif |
| 138 #if SK_MESA | 138 #if SK_MESA |
| 139 case kMESA_ContextType: | 139 case kMESA_ContextType: |
| 140 glCtx.reset(CreateMesaGLTestContext()); | 140 glCtx.reset(CreateMesaGLTestContext()); |
| 141 break; | 141 break; |
| 142 #endif | 142 #endif |
| 143 case kNullGL_ContextType: | 143 case kNullGL_ContextType: |
| 144 glCtx.reset(CreateNullGLTestContext()); | 144 glCtx.reset(CreateNullGLTestContext(kEnableNVPR_ContextOptio
ns & options)); |
| 145 break; | 145 break; |
| 146 case kDebugGL_ContextType: | 146 case kDebugGL_ContextType: |
| 147 glCtx.reset(CreateDebugGLTestContext()); | 147 glCtx.reset(CreateDebugGLTestContext()); |
| 148 break; | 148 break; |
| 149 default: | 149 default: |
| 150 return ContextInfo(); | 150 return ContextInfo(); |
| 151 } | 151 } |
| 152 if (nullptr == glCtx.get()) { | 152 if (nullptr == glCtx.get()) { |
| 153 return ContextInfo(); | 153 return ContextInfo(); |
| 154 } | 154 } |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 | 207 |
| 208 Context& context = fContexts.push_back(); | 208 Context& context = fContexts.push_back(); |
| 209 context.fGLContext = glCtx.release(); | 209 context.fGLContext = glCtx.release(); |
| 210 context.fGrContext = SkRef(grCtx.get()); | 210 context.fGrContext = SkRef(grCtx.get()); |
| 211 context.fType = type; | 211 context.fType = type; |
| 212 context.fOptions = options; | 212 context.fOptions = options; |
| 213 context.fAbandoned = false; | 213 context.fAbandoned = false; |
| 214 return ContextInfo(context.fGrContext, context.fGLContext); | 214 return ContextInfo(context.fGrContext, context.fGLContext); |
| 215 } | 215 } |
| 216 } // namespace sk_gpu_test | 216 } // namespace sk_gpu_test |
| OLD | NEW |