| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 "gl/SkGLContext.h" | 9 #include "gl/SkGLContext.h" |
| 10 #import <OpenGLES/EAGL.h> | 10 #import <OpenGLES/EAGL.h> |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 } | 82 } |
| 83 | 83 |
| 84 void IOSGLContext::onPlatformSwapBuffers() const { } | 84 void IOSGLContext::onPlatformSwapBuffers() const { } |
| 85 | 85 |
| 86 GrGLFuncPtr IOSGLContext::onPlatformGetProcAddress(const char* procName) const { | 86 GrGLFuncPtr IOSGLContext::onPlatformGetProcAddress(const char* procName) const { |
| 87 return reinterpret_cast<GrGLFuncPtr>(dlsym(fGLLibrary, procName)); | 87 return reinterpret_cast<GrGLFuncPtr>(dlsym(fGLLibrary, procName)); |
| 88 } | 88 } |
| 89 | 89 |
| 90 } // anonymous namespace | 90 } // anonymous namespace |
| 91 | 91 |
| 92 SkGLContext* SkCreatePlatformGLContext(GrGLStandard forcedGpuAPI) { | 92 SkGLContext* SkCreatePlatformGLContext(GrGLStandard forcedGpuAPI, SkGLContext* s
hareContext) { |
| 93 SkASSERT(!shareContext); |
| 94 if (shareContext) { |
| 95 return NULL; |
| 96 } |
| 93 if (kGL_GrGLStandard == forcedGpuAPI) { | 97 if (kGL_GrGLStandard == forcedGpuAPI) { |
| 94 return NULL; | 98 return NULL; |
| 95 } | 99 } |
| 96 IOSGLContext* ctx = new IOSGLContext; | 100 IOSGLContext* ctx = new IOSGLContext; |
| 97 if (!ctx->isValid()) { | 101 if (!ctx->isValid()) { |
| 98 delete ctx; | 102 delete ctx; |
| 99 return NULL; | 103 return NULL; |
| 100 } | 104 } |
| 101 return ctx; | 105 return ctx; |
| 102 } | 106 } |
| OLD | NEW |