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

Side by Side Diff: src/gpu/gl/command_buffer/SkCommandBufferGLContext.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
« no previous file with comments | « src/gpu/gl/angle/SkANGLEGLContext.cpp ('k') | src/gpu/gl/egl/SkCreatePlatformGLContext_egl.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 2015 Google Inc. 3 * Copyright 2015 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 "SkOnce.h" 8 #include "SkOnce.h"
9 #include "gl/GrGLInterface.h" 9 #include "gl/GrGLInterface.h"
10 #include "gl/GrGLAssembleInterface.h" 10 #include "gl/GrGLAssembleInterface.h"
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 SkDebugf("Command Buffer: Could not create CommandBuffer GL interface.\n "); 252 SkDebugf("Command Buffer: Could not create CommandBuffer GL interface.\n ");
253 this->destroyGLContext(); 253 this->destroyGLContext();
254 return; 254 return;
255 } 255 }
256 if (!gl->validate()) { 256 if (!gl->validate()) {
257 SkDebugf("Command Buffer: Could not validate CommandBuffer GL interface. \n"); 257 SkDebugf("Command Buffer: Could not validate CommandBuffer GL interface. \n");
258 this->destroyGLContext(); 258 this->destroyGLContext();
259 return; 259 return;
260 } 260 }
261 261
262 this->init(gl.detach()); 262 this->init(gl.release());
263 } 263 }
264 264
265 SkCommandBufferGLContext::~SkCommandBufferGLContext() { 265 SkCommandBufferGLContext::~SkCommandBufferGLContext() {
266 this->teardown(); 266 this->teardown();
267 this->destroyGLContext(); 267 this->destroyGLContext();
268 } 268 }
269 269
270 void SkCommandBufferGLContext::destroyGLContext() { 270 void SkCommandBufferGLContext::destroyGLContext() {
271 if (!gfFunctionsLoadedSuccessfully) { 271 if (!gfFunctionsLoadedSuccessfully) {
272 return; 272 return;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 EGLint result = 0; 330 EGLint result = 0;
331 gfGetConfigAttrib(fDisplay, static_cast<EGLConfig>(fConfig), EGL_STENCIL_SIZ E, &result); 331 gfGetConfigAttrib(fDisplay, static_cast<EGLConfig>(fConfig), EGL_STENCIL_SIZ E, &result);
332 return result; 332 return result;
333 } 333 }
334 334
335 int SkCommandBufferGLContext::getSampleCount() { 335 int SkCommandBufferGLContext::getSampleCount() {
336 EGLint result = 0; 336 EGLint result = 0;
337 gfGetConfigAttrib(fDisplay, static_cast<EGLConfig>(fConfig), EGL_SAMPLES, &r esult); 337 gfGetConfigAttrib(fDisplay, static_cast<EGLConfig>(fConfig), EGL_SAMPLES, &r esult);
338 return result; 338 return result;
339 } 339 }
OLDNEW
« no previous file with comments | « src/gpu/gl/angle/SkANGLEGLContext.cpp ('k') | src/gpu/gl/egl/SkCreatePlatformGLContext_egl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698