OLD | NEW |
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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 } | 173 } |
174 glEGLImageTargetTexture2D(GR_GL_TEXTURE_EXTERNAL, image); | 174 glEGLImageTargetTexture2D(GR_GL_TEXTURE_EXTERNAL, image); |
175 if (GR_GL_GET_ERROR(this->gl()) != GR_GL_NO_ERROR) { | 175 if (GR_GL_GET_ERROR(this->gl()) != GR_GL_NO_ERROR) { |
176 GR_GL_CALL(this->gl(), DeleteTextures(1, &texID)); | 176 GR_GL_CALL(this->gl(), DeleteTextures(1, &texID)); |
177 return 0; | 177 return 0; |
178 } | 178 } |
179 return texID; | 179 return texID; |
180 } | 180 } |
181 | 181 |
182 SkGLContext* SkANGLEGLContext::createNew() const { | 182 SkGLContext* SkANGLEGLContext::createNew() const { |
183 SkGLContext* ctx = SkANGLEGLContext::Create(this->gl()->fStandard, fIsGLBack
end); | 183 SkGLContext* ctx = SkANGLEGLContext::Create(fIsGLBackend); |
184 if (ctx) { | 184 if (ctx) { |
185 ctx->makeCurrent(); | 185 ctx->makeCurrent(); |
186 } | 186 } |
187 return ctx; | 187 return ctx; |
188 } | 188 } |
189 | 189 |
190 void SkANGLEGLContext::destroyGLContext() { | 190 void SkANGLEGLContext::destroyGLContext() { |
191 if (fDisplay) { | 191 if (fDisplay) { |
192 eglMakeCurrent(fDisplay, 0, 0, 0); | 192 eglMakeCurrent(fDisplay, 0, 0, 0); |
193 | 193 |
(...skipping 20 matching lines...) Expand all Loading... |
214 | 214 |
215 void SkANGLEGLContext::onPlatformSwapBuffers() const { | 215 void SkANGLEGLContext::onPlatformSwapBuffers() const { |
216 if (!eglSwapBuffers(fDisplay, fSurface)) { | 216 if (!eglSwapBuffers(fDisplay, fSurface)) { |
217 SkDebugf("Could not complete eglSwapBuffers.\n"); | 217 SkDebugf("Could not complete eglSwapBuffers.\n"); |
218 } | 218 } |
219 } | 219 } |
220 | 220 |
221 GrGLFuncPtr SkANGLEGLContext::onPlatformGetProcAddress(const char* name) const { | 221 GrGLFuncPtr SkANGLEGLContext::onPlatformGetProcAddress(const char* name) const { |
222 return eglGetProcAddress(name); | 222 return eglGetProcAddress(name); |
223 } | 223 } |
OLD | NEW |