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

Side by Side Diff: src/gpu/gl/SkGLContext.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/GrGLPathRendering.cpp ('k') | src/gpu/gl/SkNullGLContext.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 2013 Google Inc. 3 * Copyright 2013 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 #include "GrGLUtil.h" 9 #include "GrGLUtil.h"
10 #include "SkGpuFenceSync.h" 10 #include "SkGpuFenceSync.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void SkGLContext::testAbandon() { 98 void SkGLContext::testAbandon() {
99 if (fGL) { 99 if (fGL) {
100 fGL->abandon(); 100 fGL->abandon();
101 } 101 }
102 if (fFenceSync) { 102 if (fFenceSync) {
103 memset(fFrameFences, 0, sizeof(fFrameFences)); 103 memset(fFrameFences, 0, sizeof(fFrameFences));
104 } 104 }
105 } 105 }
106 106
107 SkGLContext::GLFenceSync* SkGLContext::GLFenceSync::CreateIfSupported(const SkGL Context* ctx) { 107 SkGLContext::GLFenceSync* SkGLContext::GLFenceSync::CreateIfSupported(const SkGL Context* ctx) {
108 SkAutoTDelete<GLFenceSync> ret(SkNEW(GLFenceSync)); 108 SkAutoTDelete<GLFenceSync> ret(new GLFenceSync);
109 109
110 if (kGL_GrGLStandard == ctx->gl()->fStandard) { 110 if (kGL_GrGLStandard == ctx->gl()->fStandard) {
111 const GrGLubyte* versionStr; 111 const GrGLubyte* versionStr;
112 SK_GL_RET(*ctx, versionStr, GetString(GR_GL_VERSION)); 112 SK_GL_RET(*ctx, versionStr, GetString(GR_GL_VERSION));
113 GrGLVersion version = GrGLGetVersionFromString(reinterpret_cast<const ch ar*>(versionStr)); 113 GrGLVersion version = GrGLGetVersionFromString(reinterpret_cast<const ch ar*>(versionStr));
114 if (version < GR_GL_VER(3,2) && !ctx->gl()->hasExtension("GL_ARB_sync")) { 114 if (version < GR_GL_VER(3,2) && !ctx->gl()->hasExtension("GL_ARB_sync")) {
115 return NULL; 115 return NULL;
116 } 116 }
117 ret->fGLFenceSync = reinterpret_cast<GLFenceSyncProc>( 117 ret->fGLFenceSync = reinterpret_cast<GLFenceSyncProc>(
118 ctx->onPlatformGetProcAddress("glFenceSync")); 118 ctx->onPlatformGetProcAddress("glFenceSync"));
(...skipping 26 matching lines...) Expand all
145 145
146 bool SkGLContext::GLFenceSync::flushAndWaitFence(SkPlatformGpuFence fence) const { 146 bool SkGLContext::GLFenceSync::flushAndWaitFence(SkPlatformGpuFence fence) const {
147 GLsync glsync = static_cast<GLsync>(fence); 147 GLsync glsync = static_cast<GLsync>(fence);
148 return GL_WAIT_FAILED != fGLClientWaitSync(glsync, GL_SYNC_FLUSH_COMMANDS_BI T, -1); 148 return GL_WAIT_FAILED != fGLClientWaitSync(glsync, GL_SYNC_FLUSH_COMMANDS_BI T, -1);
149 } 149 }
150 150
151 void SkGLContext::GLFenceSync::deleteFence(SkPlatformGpuFence fence) const { 151 void SkGLContext::GLFenceSync::deleteFence(SkPlatformGpuFence fence) const {
152 GLsync glsync = static_cast<GLsync>(fence); 152 GLsync glsync = static_cast<GLsync>(fence);
153 fGLDeleteSync(glsync); 153 fGLDeleteSync(glsync);
154 } 154 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLPathRendering.cpp ('k') | src/gpu/gl/SkNullGLContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698