diff options
author | 2014-06-22 22:56:53 -0700 | |
---|---|---|
committer | 2014-06-22 22:56:54 -0700 | |
commit | 74fc727dc88ee24d89f88cb1709f963e9073aeb3 (patch) | |
tree | c1bc9dd2101168a5fbb2b9d523aafac3828c7876 /src/gpu/gl/mesa | |
parent | 32956400b4d8f33394e2cdef9b66e8369ba2a0f3 (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/mesa')
-rw-r--r-- | src/gpu/gl/mesa/SkMesaGLContext.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gpu/gl/mesa/SkMesaGLContext.cpp b/src/gpu/gl/mesa/SkMesaGLContext.cpp index 0199d12c19..58e325dfeb 100644 --- a/src/gpu/gl/mesa/SkMesaGLContext.cpp +++ b/src/gpu/gl/mesa/SkMesaGLContext.cpp @@ -53,7 +53,11 @@ void SkMesaGLContext::destroyGLContext() { static const GrGLint gBOGUS_SIZE = 16; -const GrGLInterface* SkMesaGLContext::createGLContext() { +const GrGLInterface* SkMesaGLContext::createGLContext(GrGLStandard forcedGpuAPI) { + if (kGLES_GrGLStandard == forcedGpuAPI) { + return NULL; + } + /* Create an RGBA-mode context */ #if OSMESA_MAJOR_VERSION * 100 + OSMESA_MINOR_VERSION >= 305 /* specify Z, stencil, accum sizes */ |