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

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

Issue 1809733002: detach -> release (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: (C) Created 4 years, 9 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
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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 this->destroyGLContext(); 172 this->destroyGLContext();
173 continue; 173 continue;
174 } 174 }
175 175
176 if (!gl->validate()) { 176 if (!gl->validate()) {
177 SkDebugf("Failed to validate gl interface.\n"); 177 SkDebugf("Failed to validate gl interface.\n");
178 this->destroyGLContext(); 178 this->destroyGLContext();
179 continue; 179 continue;
180 } 180 }
181 181
182 this->init(gl.detach(), SkEGLFenceSync::CreateIfSupported(fDisplay)); 182 this->init(gl.release(), SkEGLFenceSync::CreateIfSupported(fDisplay));
183 break; 183 break;
184 } 184 }
185 } 185 }
186 186
187 EGLGLContext::~EGLGLContext() { 187 EGLGLContext::~EGLGLContext() {
188 this->teardown(); 188 this->teardown();
189 this->destroyGLContext(); 189 this->destroyGLContext();
190 } 190 }
191 191
192 void EGLGLContext::destroyGLContext() { 192 void EGLGLContext::destroyGLContext() {
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 return nullptr; 324 return nullptr;
325 } 325 }
326 EGLGLContext* ctx = new EGLGLContext(forcedGpuAPI); 326 EGLGLContext* ctx = new EGLGLContext(forcedGpuAPI);
327 if (!ctx->isValid()) { 327 if (!ctx->isValid()) {
328 delete ctx; 328 delete ctx;
329 return nullptr; 329 return nullptr;
330 } 330 }
331 return ctx; 331 return ctx;
332 } 332 }
333 333
OLDNEW
« no previous file with comments | « src/gpu/gl/command_buffer/SkCommandBufferGLContext.cpp ('k') | src/gpu/gl/glx/SkCreatePlatformGLContext_glx.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698