| Index: ui/gl/gl_context_glx.cc
|
| diff --git a/ui/gl/gl_context_glx.cc b/ui/gl/gl_context_glx.cc
|
| index 4be08f647d685a15702562c46a9d101c32dc967d..2bdda7ffcbdf52aab33d04e353b522c72e629ab8 100644
|
| --- a/ui/gl/gl_context_glx.cc
|
| +++ b/ui/gl/gl_context_glx.cc
|
| @@ -9,6 +9,7 @@ extern "C" {
|
| }
|
| #include <memory>
|
|
|
| +#include "base/command_line.h"
|
| #include "base/logging.h"
|
| #include "base/numerics/safe_conversions.h"
|
| #include "base/trace_event/trace_event.h"
|
| @@ -168,9 +169,16 @@ bool GLContextGLX::Initialize(
|
|
|
| if (GLSurfaceGLX::IsCreateContextSupported()) {
|
| DVLOG(1) << "GLX_ARB_create_context supported.";
|
| - context_ = CreateHighestVersionContext(
|
| - display_, static_cast<GLXFBConfig>(compatible_surface->GetConfig()),
|
| - share_handle);
|
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kCreateDefaultGLContext)) {
|
| + context_ = CreateContextAttribs(
|
| + display_, static_cast<GLXFBConfig>(compatible_surface->GetConfig()),
|
| + share_handle, GLVersion(0, 0), 0);
|
| + } else {
|
| + context_ = CreateHighestVersionContext(
|
| + display_, static_cast<GLXFBConfig>(compatible_surface->GetConfig()),
|
| + share_handle);
|
| + }
|
| if (!context_) {
|
| LOG(ERROR) << "Failed to create GL context with "
|
| << "glXCreateContextAttribsARB.";
|
|
|