diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-05 21:47:55 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-05 21:47:55 +0000 |
commit | 002a0b0663d27a9024cd5e404555a43a2f82fe80 (patch) | |
tree | 5708d231c613637d983016d09f43a80ab4250168 /app/gfx | |
parent | ebf4f04c8f99e43588158bdf3fe1e2019425b674 (diff) | |
download | chromium_src-002a0b0663d27a9024cd5e404555a43a2f82fe80.zip chromium_src-002a0b0663d27a9024cd5e404555a43a2f82fe80.tar.gz chromium_src-002a0b0663d27a9024cd5e404555a43a2f82fe80.tar.bz2 |
GPU process does one-off EGL initialization on linux.
This should get WebGL working on EGL/GLES2 ARM boxes again.
TEST=try
BUG=53823
Review URL: http://codereview.chromium.org/3466011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61565 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/gfx')
-rw-r--r-- | app/gfx/gl/gl_context_linux.cc | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/app/gfx/gl/gl_context_linux.cc b/app/gfx/gl/gl_context_linux.cc index 878a5fb..48f0368 100644 --- a/app/gfx/gl/gl_context_linux.cc +++ b/app/gfx/gl/gl_context_linux.cc @@ -170,19 +170,31 @@ bool GLContext::InitializeOneOff() { return false; } - // Only check the GLX version if we are in fact using GLX. We might actually - // be using the mock GL implementation. - if (GetGLImplementation() == kGLImplementationDesktopGL) { - Display* display = x11_util::GetXDisplay(); - int major, minor; - if (!glXQueryVersion(display, &major, &minor)) { - LOG(ERROR) << "glxQueryVersion failed"; - return false; - } + switch (GetGLImplementation()) { + case kGLImplementationDesktopGL: { + // Only check the GLX version if we are in fact using GLX. We might + // actually be using the mock GL implementation. + Display* display = x11_util::GetXDisplay(); + int major, minor; + if (!glXQueryVersion(display, &major, &minor)) { + LOG(ERROR) << "glxQueryVersion failed"; + return false; + } + + if (major == 1 && minor < 3) { + LOG(WARNING) << "GLX 1.3 or later is recommended."; + } - if (major == 1 && minor < 3) { - LOG(WARNING) << "GLX 1.3 or later is recommended."; + break; } + case kGLImplementationEGLGLES2: + if (!BaseEGLContext::InitializeOneOff()) { + LOG(ERROR) << "BaseEGLContext::InitializeOneOff failed."; + return false; + } + break; + default: + break; } initialized = true; |