Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(344)

Side by Side Diff: src/gpu/gl/egl/SkCreatePlatformGLContext_egl.cpp

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/gl/debug/SkDebugGLContext.h ('k') | src/gpu/gl/glx/SkCreatePlatformGLContext_glx.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 } 229 }
230 extensionsStr = match + extensionLength; 230 extensionsStr = match + extensionLength;
231 } 231 }
232 return false; 232 return false;
233 } 233 }
234 234
235 SkEGLFenceSync* SkEGLFenceSync::CreateIfSupported(EGLDisplay display) { 235 SkEGLFenceSync* SkEGLFenceSync::CreateIfSupported(EGLDisplay display) {
236 if (!display || !supports_egl_extension(display, "EGL_KHR_fence_sync")) { 236 if (!display || !supports_egl_extension(display, "EGL_KHR_fence_sync")) {
237 return NULL; 237 return NULL;
238 } 238 }
239 return SkNEW_ARGS(SkEGLFenceSync, (display)); 239 return new SkEGLFenceSync(display);
240 } 240 }
241 241
242 SkPlatformGpuFence SkEGLFenceSync::insertFence() const { 242 SkPlatformGpuFence SkEGLFenceSync::insertFence() const {
243 return eglCreateSyncKHR(fDisplay, EGL_SYNC_FENCE_KHR, NULL); 243 return eglCreateSyncKHR(fDisplay, EGL_SYNC_FENCE_KHR, NULL);
244 } 244 }
245 245
246 bool SkEGLFenceSync::flushAndWaitFence(SkPlatformGpuFence platformFence) const { 246 bool SkEGLFenceSync::flushAndWaitFence(SkPlatformGpuFence platformFence) const {
247 EGLSyncKHR eglsync = static_cast<EGLSyncKHR>(platformFence); 247 EGLSyncKHR eglsync = static_cast<EGLSyncKHR>(platformFence);
248 return EGL_CONDITION_SATISFIED_KHR == eglClientWaitSyncKHR(fDisplay, 248 return EGL_CONDITION_SATISFIED_KHR == eglClientWaitSyncKHR(fDisplay,
249 eglsync, 249 eglsync,
250 EGL_SYNC_FLUSH_CO MMANDS_BIT_KHR, 250 EGL_SYNC_FLUSH_CO MMANDS_BIT_KHR,
251 EGL_FOREVER_KHR); 251 EGL_FOREVER_KHR);
252 } 252 }
253 253
254 void SkEGLFenceSync::deleteFence(SkPlatformGpuFence platformFence) const { 254 void SkEGLFenceSync::deleteFence(SkPlatformGpuFence platformFence) const {
255 EGLSyncKHR eglsync = static_cast<EGLSyncKHR>(platformFence); 255 EGLSyncKHR eglsync = static_cast<EGLSyncKHR>(platformFence);
256 eglDestroySyncKHR(fDisplay, eglsync); 256 eglDestroySyncKHR(fDisplay, eglsync);
257 } 257 }
258 258
259 } // anonymous namespace 259 } // anonymous namespace
260 260
261 SkGLContext* SkCreatePlatformGLContext(GrGLStandard forcedGpuAPI) { 261 SkGLContext* SkCreatePlatformGLContext(GrGLStandard forcedGpuAPI) {
262 EGLGLContext* ctx = SkNEW_ARGS(EGLGLContext, (forcedGpuAPI)); 262 EGLGLContext* ctx = new EGLGLContext(forcedGpuAPI);
263 if (!ctx->isValid()) { 263 if (!ctx->isValid()) {
264 SkDELETE(ctx); 264 delete ctx;
265 return NULL; 265 return NULL;
266 } 266 }
267 return ctx; 267 return ctx;
268 } 268 }
269 269
OLDNEW
« no previous file with comments | « src/gpu/gl/debug/SkDebugGLContext.h ('k') | src/gpu/gl/glx/SkCreatePlatformGLContext_glx.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698