| 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 "gl/SkGLContext.h" | 8 #include "gl/SkGLContext.h" |
| 9 | 9 |
| 10 #include <GLES2/gl2.h> | 10 #include <GLES2/gl2.h> |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 EGL_FOREVER_KHR); | 310 EGL_FOREVER_KHR); |
| 311 } | 311 } |
| 312 | 312 |
| 313 void SkEGLFenceSync::deleteFence(SkPlatformGpuFence platformFence) const { | 313 void SkEGLFenceSync::deleteFence(SkPlatformGpuFence platformFence) const { |
| 314 EGLSyncKHR eglsync = static_cast<EGLSyncKHR>(platformFence); | 314 EGLSyncKHR eglsync = static_cast<EGLSyncKHR>(platformFence); |
| 315 eglDestroySyncKHR(fDisplay, eglsync); | 315 eglDestroySyncKHR(fDisplay, eglsync); |
| 316 } | 316 } |
| 317 | 317 |
| 318 } // anonymous namespace | 318 } // anonymous namespace |
| 319 | 319 |
| 320 SkGLContext* SkCreatePlatformGLContext(GrGLStandard forcedGpuAPI) { | 320 SkGLContext* SkCreatePlatformGLContext(GrGLStandard forcedGpuAPI, SkGLContext* s
hareContext) { |
| 321 SkASSERT(!shareContext); |
| 322 if (shareContext) { |
| 323 return nullptr; |
| 324 } |
| 321 EGLGLContext* ctx = new EGLGLContext(forcedGpuAPI); | 325 EGLGLContext* ctx = new EGLGLContext(forcedGpuAPI); |
| 322 if (!ctx->isValid()) { | 326 if (!ctx->isValid()) { |
| 323 delete ctx; | 327 delete ctx; |
| 324 return nullptr; | 328 return nullptr; |
| 325 } | 329 } |
| 326 return ctx; | 330 return ctx; |
| 327 } | 331 } |
| 328 | 332 |
| OLD | NEW |