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 "GLTestContext_angle.h" | 9 #include "GLTestContext_angle.h" |
10 | 10 |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 | 192 |
193 void ANGLEGLContext::destroyEGLImage(GrEGLImage image) const { | 193 void ANGLEGLContext::destroyEGLImage(GrEGLImage image) const { |
194 GR_GL_CALL(this->gl(), EGLDestroyImage(fDisplay, image)); | 194 GR_GL_CALL(this->gl(), EGLDestroyImage(fDisplay, image)); |
195 } | 195 } |
196 | 196 |
197 GrGLuint ANGLEGLContext::eglImageToExternalTexture(GrEGLImage image) const { | 197 GrGLuint ANGLEGLContext::eglImageToExternalTexture(GrEGLImage image) const { |
198 GrGLClearErr(this->gl()); | 198 GrGLClearErr(this->gl()); |
199 if (!this->gl()->hasExtension("GL_OES_EGL_image_external")) { | 199 if (!this->gl()->hasExtension("GL_OES_EGL_image_external")) { |
200 return 0; | 200 return 0; |
201 } | 201 } |
202 typedef GrGLvoid (*EGLImageTargetTexture2DProc)(GrGLenum, GrGLeglImage); | 202 typedef GrGLvoid (EGLAPIENTRY *EGLImageTargetTexture2DProc)(GrGLenum, GrGLeg
lImage); |
203 EGLImageTargetTexture2DProc glEGLImageTargetTexture2D = | 203 EGLImageTargetTexture2DProc glEGLImageTargetTexture2D = |
204 (EGLImageTargetTexture2DProc)eglGetProcAddress("glEGLImageTargetTexture2
DOES"); | 204 (EGLImageTargetTexture2DProc)eglGetProcAddress("glEGLImageTargetTexture2
DOES"); |
205 if (!glEGLImageTargetTexture2D) { | 205 if (!glEGLImageTargetTexture2D) { |
206 return 0; | 206 return 0; |
207 } | 207 } |
208 GrGLuint texID; | 208 GrGLuint texID; |
209 GR_GL_CALL(this->gl(), GenTextures(1, &texID)); | 209 GR_GL_CALL(this->gl(), GenTextures(1, &texID)); |
210 if (!texID) { | 210 if (!texID) { |
211 return 0; | 211 return 0; |
212 } | 212 } |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 | 312 |
313 GLTestContext* CreateANGLEOpenGLGLTestContext() { | 313 GLTestContext* CreateANGLEOpenGLGLTestContext() { |
314 ANGLEGLContext* ctx = new ANGLEGLContext(true); | 314 ANGLEGLContext* ctx = new ANGLEGLContext(true); |
315 if (!ctx->isValid()) { | 315 if (!ctx->isValid()) { |
316 delete ctx; | 316 delete ctx; |
317 return NULL; | 317 return NULL; |
318 } | 318 } |
319 return ctx; | 319 return ctx; |
320 } | 320 } |
321 } // namespace sk_gpu_test | 321 } // namespace sk_gpu_test |
OLD | NEW |