| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 } | 68 } |
| 69 } else { | 69 } else { |
| 70 glInterface.reset(GrGLInterfaceRemoveNVPR(glInterface)); | 70 glInterface.reset(GrGLInterfaceRemoveNVPR(glInterface)); |
| 71 if (!glInterface) { | 71 if (!glInterface) { |
| 72 return NULL; | 72 return NULL; |
| 73 } | 73 } |
| 74 } | 74 } |
| 75 | 75 |
| 76 glCtx->makeCurrent(); | 76 glCtx->makeCurrent(); |
| 77 GrBackendContext p3dctx = reinterpret_cast<GrBackendContext>(glInterface.get
()); | 77 GrBackendContext p3dctx = reinterpret_cast<GrBackendContext>(glInterface.get
()); |
| 78 grCtx.reset(GrContext::Create(kOpenGL_GrBackend, p3dctx, fGlobalOptions)); | 78 grCtx.reset(GrContext::Create(kOpenGL_GrBackend, p3dctx, &fGlobalOptions)); |
| 79 if (!grCtx.get()) { | 79 if (!grCtx.get()) { |
| 80 return NULL; | 80 return NULL; |
| 81 } | 81 } |
| 82 GPUContext& ctx = fContexts.push_back(); | 82 GPUContext& ctx = fContexts.push_back(); |
| 83 ctx.fGLContext = glCtx.get(); | 83 ctx.fGLContext = glCtx.get(); |
| 84 ctx.fGLContext->ref(); | 84 ctx.fGLContext->ref(); |
| 85 ctx.fGrContext = grCtx.get(); | 85 ctx.fGrContext = grCtx.get(); |
| 86 ctx.fGrContext->ref(); | 86 ctx.fGrContext->ref(); |
| 87 ctx.fType = type; | 87 ctx.fType = type; |
| 88 return ctx.fGrContext; | 88 return ctx.fGrContext; |
| 89 } | 89 } |
| OLD | NEW |