diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-27 19:34:00 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-27 19:34:00 +0000 |
commit | 828455fb7acdfdb843dc60331e3e33998901050f (patch) | |
tree | a9afa59ef4d12865f166a0dbff145da110714dbb /app/gfx | |
parent | 13e4418cd94e979f87299cfa629823a71d8e73d4 (diff) | |
download | chromium_src-828455fb7acdfdb843dc60331e3e33998901050f.zip chromium_src-828455fb7acdfdb843dc60331e3e33998901050f.tar.gz chromium_src-828455fb7acdfdb843dc60331e3e33998901050f.tar.bz2 |
Specify client version 2 when creating EGL contexts.
It was doing this already for SecondaryEGLContext but not for NativeViewEGLContext, which made it default to EGL version 1 on non-ANGLE EGL implementations.
I also fixed ANGLE upstream in r468 so it fails to create a context unless version 2 is explicitly requested.
TEST=try
BUG=53823
Review URL: http://codereview.chromium.org/4089006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64119 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/gfx')
-rw-r--r-- | app/gfx/gl/gl_context_egl.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/gfx/gl/gl_context_egl.cc b/app/gfx/gl/gl_context_egl.cc index 680764d..fa82e6d 100644 --- a/app/gfx/gl/gl_context_egl.cc +++ b/app/gfx/gl/gl_context_egl.cc @@ -166,8 +166,12 @@ bool NativeViewEGLContext::Initialize() { return false; } - // Create a context. - context_ = eglCreateContext(g_display, g_config, NULL, NULL); + static const EGLint kContextAttributes[] = { + EGL_CONTEXT_CLIENT_VERSION, 2, + EGL_NONE + }; + + context_ = eglCreateContext(g_display, g_config, NULL, kContextAttributes); if (!context_) { LOG(ERROR) << "eglCreateContext failed with error " << GetLastEGLErrorString(); |