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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 glEGLImageTargetTexture2D(GR_GL_TEXTURE_EXTERNAL, image); | 218 glEGLImageTargetTexture2D(GR_GL_TEXTURE_EXTERNAL, image); |
219 if (GR_GL_GET_ERROR(this->gl()) != GR_GL_NO_ERROR) { | 219 if (GR_GL_GET_ERROR(this->gl()) != GR_GL_NO_ERROR) { |
220 GR_GL_CALL(this->gl(), DeleteTextures(1, &texID)); | 220 GR_GL_CALL(this->gl(), DeleteTextures(1, &texID)); |
221 return 0; | 221 return 0; |
222 } | 222 } |
223 return texID; | 223 return texID; |
224 } | 224 } |
225 | 225 |
226 sk_gpu_test::GLTestContext* ANGLEGLContext::createNew() const { | 226 sk_gpu_test::GLTestContext* ANGLEGLContext::createNew() const { |
227 #ifdef SK_BUILD_FOR_WIN | 227 #ifdef SK_BUILD_FOR_WIN |
228 sk_gpu_test::GLTestContext* ctx = fIsGLBackend? | 228 sk_gpu_test::GLTestContext* ctx = fIsGLBackend |
229 ? sk_gpu_test::CreateANGLEOpenGLGLTestContext() | 229 ? sk_gpu_test::CreateANGLEOpenGLGLTestContext() |
230 : sk_gpu_test::CreateANGLEDirect3DGLTestContext(); | 230 : sk_gpu_test::CreateANGLEDirect3DGLTestContext(); |
231 #else | 231 #else |
232 sk_gpu_test::GLTestContext* ctx = sk_gpu_test::CreateANGLEOpenGLGLTestContex
t(); | 232 sk_gpu_test::GLTestContext* ctx = sk_gpu_test::CreateANGLEOpenGLGLTestContex
t(); |
233 #endif | 233 #endif |
234 if (ctx) { | 234 if (ctx) { |
235 ctx->makeCurrent(); | 235 ctx->makeCurrent(); |
236 } | 236 } |
237 return ctx; | 237 return ctx; |
238 } | 238 } |
(...skipping 73 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 |