diff options
author | kkinnunen <kkinnunen@nvidia.com> | 2014-06-30 06:36:31 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-06-30 06:36:31 -0700 |
commit | 80549fcdd50269d7e069d6db02b395fca128056c (patch) | |
tree | f190d563157d1e5e41f26e0bc1cf724b17a7f3c4 /src/gpu/gl/iOS/SkNativeGLContext_iOS.mm | |
parent | b8562be65510ea2703e1e34029da8c8f501c340c (diff) |
Support using OpenGL ES context on desktop
Support using OpenGL ES context on desktop for unix and Android platforms. This
is mainly useful in development.
Add --gpuAPI flag to gm, dm, bench, bench_pictures and render_pictures. The
possible parameters for the flag are "gl" and "gles".
R=bsalomon@google.com, mtklein@google.com, robertphillips@google.com
Author: kkinnunen@nvidia.com
Review URL: https://codereview.chromium.org/319043005
Diffstat (limited to 'src/gpu/gl/iOS/SkNativeGLContext_iOS.mm')
-rw-r--r-- | src/gpu/gl/iOS/SkNativeGLContext_iOS.mm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gpu/gl/iOS/SkNativeGLContext_iOS.mm b/src/gpu/gl/iOS/SkNativeGLContext_iOS.mm index a276fd05da..1e11c0deb7 100644 --- a/src/gpu/gl/iOS/SkNativeGLContext_iOS.mm +++ b/src/gpu/gl/iOS/SkNativeGLContext_iOS.mm @@ -42,7 +42,11 @@ void SkNativeGLContext::destroyGLContext() { [EAGLCTX release]; } -const GrGLInterface* SkNativeGLContext::createGLContext() { +const GrGLInterface* SkNativeGLContext::createGLContext(GrGLStandard forcedGpuAPI) { + if (kGL_GrGLStandard == forcedGpuAPI) { + return NULL; + } + fEAGLContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; [EAGLContext setCurrentContext:EAGLCTX]; @@ -61,4 +65,4 @@ void SkNativeGLContext::makeCurrent() const { } } -void SkNativeGLContext::swapBuffers() const { }
\ No newline at end of file +void SkNativeGLContext::swapBuffers() const { } |