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

Side by Side Diff: src/gpu/gl/glx/SkCreatePlatformGLContext_glx.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 <X11/Xlib.h> 10 #include <X11/Xlib.h>
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 this->destroyGLContext(); 277 this->destroyGLContext();
278 return; 278 return;
279 } 279 }
280 280
281 if (!gl->validate()) { 281 if (!gl->validate()) {
282 SkDebugf("Failed to validate gl interface"); 282 SkDebugf("Failed to validate gl interface");
283 this->destroyGLContext(); 283 this->destroyGLContext();
284 return; 284 return;
285 } 285 }
286 286
287 this->init(gl.detach()); 287 this->init(gl.release());
288 } 288 }
289 289
290 290
291 GLXGLContext::~GLXGLContext() { 291 GLXGLContext::~GLXGLContext() {
292 this->teardown(); 292 this->teardown();
293 this->destroyGLContext(); 293 this->destroyGLContext();
294 } 294 }
295 295
296 void GLXGLContext::destroyGLContext() { 296 void GLXGLContext::destroyGLContext() {
297 if (fDisplay) { 297 if (fDisplay) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 335
336 SkGLContext* SkCreatePlatformGLContext(GrGLStandard forcedGpuAPI, SkGLContext* s hareContext) { 336 SkGLContext* SkCreatePlatformGLContext(GrGLStandard forcedGpuAPI, SkGLContext* s hareContext) {
337 GLXGLContext* glxShareContext = reinterpret_cast<GLXGLContext*>(shareContext ); 337 GLXGLContext* glxShareContext = reinterpret_cast<GLXGLContext*>(shareContext );
338 GLXGLContext *ctx = new GLXGLContext(forcedGpuAPI, glxShareContext); 338 GLXGLContext *ctx = new GLXGLContext(forcedGpuAPI, glxShareContext);
339 if (!ctx->isValid()) { 339 if (!ctx->isValid()) {
340 delete ctx; 340 delete ctx;
341 return nullptr; 341 return nullptr;
342 } 342 }
343 return ctx; 343 return ctx;
344 } 344 }
OLDNEW
« no previous file with comments | « src/gpu/gl/egl/SkCreatePlatformGLContext_egl.cpp ('k') | src/gpu/gl/iOS/SkCreatePlatformGLContext_iOS.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698