Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4977)

Unified Diff: app/gfx/gl/gl_context_linux.cc

Issue 3466011: GPU process does one-off EGL initialization on linux.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/gfx/gl/gl_context_linux.cc
===================================================================
--- app/gfx/gl/gl_context_linux.cc (revision 59972)
+++ app/gfx/gl/gl_context_linux.cc (working copy)
@@ -170,19 +170,31 @@
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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698