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

Side by Side Diff: src/gpu/gl/angle/SkANGLEGLContext.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/SkGLContext.cpp ('k') | src/gpu/gl/command_buffer/SkCommandBufferGLContext.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 2012 Google Inc. 3 * Copyright 2012 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 8
9 #include "gl/angle/SkANGLEGLContext.h" 9 #include "gl/angle/SkANGLEGLContext.h"
10 10
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 SkDebugf("Could not create ANGLE GL interface!\n"); 116 SkDebugf("Could not create ANGLE GL interface!\n");
117 this->destroyGLContext(); 117 this->destroyGLContext();
118 return; 118 return;
119 } 119 }
120 if (!gl->validate()) { 120 if (!gl->validate()) {
121 SkDebugf("Could not validate ANGLE GL interface!\n"); 121 SkDebugf("Could not validate ANGLE GL interface!\n");
122 this->destroyGLContext(); 122 this->destroyGLContext();
123 return; 123 return;
124 } 124 }
125 125
126 this->init(gl.detach()); 126 this->init(gl.release());
127 } 127 }
128 128
129 SkANGLEGLContext::~SkANGLEGLContext() { 129 SkANGLEGLContext::~SkANGLEGLContext() {
130 this->teardown(); 130 this->teardown();
131 this->destroyGLContext(); 131 this->destroyGLContext();
132 } 132 }
133 133
134 GrEGLImage SkANGLEGLContext::texture2DToEGLImage(GrGLuint texID) const { 134 GrEGLImage SkANGLEGLContext::texture2DToEGLImage(GrGLuint texID) const {
135 if (!this->gl()->hasExtension("EGL_KHR_gl_texture_2D_image")) { 135 if (!this->gl()->hasExtension("EGL_KHR_gl_texture_2D_image")) {
136 return GR_EGL_NO_IMAGE; 136 return GR_EGL_NO_IMAGE;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 219
220 void SkANGLEGLContext::onPlatformSwapBuffers() const { 220 void SkANGLEGLContext::onPlatformSwapBuffers() const {
221 if (!eglSwapBuffers(fDisplay, fSurface)) { 221 if (!eglSwapBuffers(fDisplay, fSurface)) {
222 SkDebugf("Could not complete eglSwapBuffers.\n"); 222 SkDebugf("Could not complete eglSwapBuffers.\n");
223 } 223 }
224 } 224 }
225 225
226 GrGLFuncPtr SkANGLEGLContext::onPlatformGetProcAddress(const char* name) const { 226 GrGLFuncPtr SkANGLEGLContext::onPlatformGetProcAddress(const char* name) const {
227 return eglGetProcAddress(name); 227 return eglGetProcAddress(name);
228 } 228 }
OLDNEW
« no previous file with comments | « src/gpu/gl/SkGLContext.cpp ('k') | src/gpu/gl/command_buffer/SkCommandBufferGLContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698