| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 if (!grCtx.get()) { | 136 if (!grCtx.get()) { |
| 137 return ContextInfo(); | 137 return ContextInfo(); |
| 138 } | 138 } |
| 139 if (kEnableNVPR_GLContextOptions & options) { | 139 if (kEnableNVPR_GLContextOptions & options) { |
| 140 if (!grCtx->caps()->shaderCaps()->pathRenderingSupport()) { | 140 if (!grCtx->caps()->shaderCaps()->pathRenderingSupport()) { |
| 141 return ContextInfo(); | 141 return ContextInfo(); |
| 142 } | 142 } |
| 143 } | 143 } |
| 144 | 144 |
| 145 Context& context = fContexts.push_back(); | 145 Context& context = fContexts.push_back(); |
| 146 context.fGLContext = glCtx.detach(); | 146 context.fGLContext = glCtx.release(); |
| 147 context.fGrContext = SkRef(grCtx.get()); | 147 context.fGrContext = SkRef(grCtx.get()); |
| 148 context.fType = type; | 148 context.fType = type; |
| 149 context.fOptions = options; | 149 context.fOptions = options; |
| 150 return ContextInfo(context.fGrContext, context.fGLContext); | 150 return ContextInfo(context.fGrContext, context.fGLContext); |
| 151 } | 151 } |
| OLD | NEW |