diff options
author | 2014-06-22 22:56:53 -0700 | |
---|---|---|
committer | 2014-06-22 22:56:54 -0700 | |
commit | 74fc727dc88ee24d89f88cb1709f963e9073aeb3 (patch) | |
tree | c1bc9dd2101168a5fbb2b9d523aafac3828c7876 /include/utils/SkWGL.h | |
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 'include/utils/SkWGL.h')
-rw-r--r-- | include/utils/SkWGL.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/utils/SkWGL.h b/include/utils/SkWGL.h index 5f630a1689..5272f17c87 100644 --- a/include/utils/SkWGL.h +++ b/include/utils/SkWGL.h @@ -104,12 +104,22 @@ private: CreateContextAttribsProc fCreateContextAttribs; }; +enum SkWGLContextRequest { + /** Requests to create core profile context if possible, otherwise + compatibility profile. */ + kGLPreferCoreProfile_SkWGLContextRequest, + /** Requests to create compatibility profile context if possible, otherwise + core profile. */ + kGLPreferCompatibilityProfile_SkWGLContextRequest, + /** Requests to create GL ES profile context. */ + kGLES_SkWGLContextRequest +}; /** * Helper to create an OpenGL context for a DC using WGL. Configs with a sample count >= to * msaaSampleCount are preferred but if none is available then a context with a lower sample count * (including non-MSAA) will be created. If preferCoreProfile is true but a core profile cannot be * created then a compatible profile context will be created. */ -HGLRC SkCreateWGLContext(HDC dc, int msaaSampleCount, bool preferCoreProfile); +HGLRC SkCreateWGLContext(HDC dc, int msaaSampleCount, SkWGLContextRequest context); #endif |