| 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 | 10 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 #ifdef SK_BUILD_FOR_WIN | 88 #ifdef SK_BUILD_FOR_WIN |
| 89 case kANGLE_GLContextType: | 89 case kANGLE_GLContextType: |
| 90 glCtx.reset(SkANGLEGLContext::CreateDirectX()); | 90 glCtx.reset(SkANGLEGLContext::CreateDirectX()); |
| 91 break; | 91 break; |
| 92 #endif | 92 #endif |
| 93 case kANGLE_GL_GLContextType: | 93 case kANGLE_GL_GLContextType: |
| 94 glCtx.reset(SkANGLEGLContext::CreateOpenGL()); | 94 glCtx.reset(SkANGLEGLContext::CreateOpenGL()); |
| 95 break; | 95 break; |
| 96 #endif | 96 #endif |
| 97 #if SK_COMMAND_BUFFER | 97 #if SK_COMMAND_BUFFER |
| 98 case kCommandBuffer_GLContextType: | 98 case kCommandBufferES2_GLContextType: |
| 99 glCtx.reset(SkCommandBufferGLContext::Create()); | 99 glCtx.reset(SkCommandBufferGLContext::CreateES2()); |
| 100 break; |
| 101 case kCommandBufferES3_GLContextType: |
| 102 glCtx.reset(SkCommandBufferGLContext::CreateES3()); |
| 100 break; | 103 break; |
| 101 #endif | 104 #endif |
| 102 #if SK_MESA | 105 #if SK_MESA |
| 103 case kMESA_GLContextType: | 106 case kMESA_GLContextType: |
| 104 glCtx.reset(SkMesaGLContext::Create()); | 107 glCtx.reset(SkMesaGLContext::Create()); |
| 105 break; | 108 break; |
| 106 #endif | 109 #endif |
| 107 case kNull_GLContextType: | 110 case kNull_GLContextType: |
| 108 glCtx.reset(SkNullGLContext::Create()); | 111 glCtx.reset(SkNullGLContext::Create()); |
| 109 break; | 112 break; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 } | 145 } |
| 143 } | 146 } |
| 144 | 147 |
| 145 Context& context = fContexts.push_back(); | 148 Context& context = fContexts.push_back(); |
| 146 context.fGLContext = glCtx.detach(); | 149 context.fGLContext = glCtx.detach(); |
| 147 context.fGrContext = SkRef(grCtx.get()); | 150 context.fGrContext = SkRef(grCtx.get()); |
| 148 context.fType = type; | 151 context.fType = type; |
| 149 context.fOptions = options; | 152 context.fOptions = options; |
| 150 return ContextInfo(context.fGrContext, context.fGLContext); | 153 return ContextInfo(context.fGrContext, context.fGLContext); |
| 151 } | 154 } |
| OLD | NEW |