Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 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 #include "SkTypes.h" | 8 #include "SkTypes.h" |
| 9 #if defined(SK_BUILD_FOR_MAC) | 9 #if defined(SK_BUILD_FOR_MAC) |
| 10 | 10 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 102 void MacGLContext::onPlatformSwapBuffers() const { | 102 void MacGLContext::onPlatformSwapBuffers() const { |
| 103 CGLFlushDrawable(fContext); | 103 CGLFlushDrawable(fContext); |
| 104 } | 104 } |
| 105 | 105 |
| 106 GrGLFuncPtr MacGLContext::onPlatformGetProcAddress(const char* procName) const { | 106 GrGLFuncPtr MacGLContext::onPlatformGetProcAddress(const char* procName) const { |
| 107 return reinterpret_cast<GrGLFuncPtr>(dlsym(fGLLibrary, procName)); | 107 return reinterpret_cast<GrGLFuncPtr>(dlsym(fGLLibrary, procName)); |
| 108 } | 108 } |
| 109 | 109 |
| 110 } // anonymous namespace | 110 } // anonymous namespace |
| 111 | 111 |
| 112 SkGLContext* SkCreatePlatformGLContext(GrGLStandard forcedGpuAPI) { | 112 SkGLContext* SkCreatePlatformGLContext(GrGLStandard forcedGpuAPI, SkGLContext*) { |
|
bsalomon
2016/01/19 22:00:57
I think these backends where it is unimplemented s
joshualitt
2016/01/20 14:36:56
Acknowledged.
| |
| 113 if (kGLES_GrGLStandard == forcedGpuAPI) { | 113 if (kGLES_GrGLStandard == forcedGpuAPI) { |
| 114 return nullptr; | 114 return nullptr; |
| 115 } | 115 } |
| 116 MacGLContext* ctx = new MacGLContext; | 116 MacGLContext* ctx = new MacGLContext; |
| 117 if (!ctx->isValid()) { | 117 if (!ctx->isValid()) { |
| 118 delete ctx; | 118 delete ctx; |
| 119 return nullptr; | 119 return nullptr; |
| 120 } | 120 } |
| 121 return ctx; | 121 return ctx; |
| 122 } | 122 } |
| 123 | 123 |
| 124 #endif//defined(SK_BUILD_FOR_MAC) | 124 #endif//defined(SK_BUILD_FOR_MAC) |
| OLD | NEW |