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