summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2018-03-12 15:38:02 +0100
committerMichal Klocek <michal.klocek@qt.io>2018-03-12 15:00:11 +0000
commit899b407b1128d0dbba360022a5ced872fabeec3f (patch)
treef022885153594b2e082e2dd97ae6c181a1e71344
parent458ee912871b76ad351e946d4d84c70ebe7a429b (diff)
downloadqtwebengine-chromium-63-based.tar.gz
Fix freezes of glx context63-based
Add back support for compatibility profile. Change-Id: I746b53c4622614f847540481cdb43da416ba03b1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--chromium/ui/gl/gl_context_glx.cc11
-rw-r--r--chromium/ui/gl/gl_switches.cc2
-rw-r--r--chromium/ui/gl/gl_switches.h3
3 files changed, 11 insertions, 5 deletions
diff --git a/chromium/ui/gl/gl_context_glx.cc b/chromium/ui/gl/gl_context_glx.cc
index d66d3119382..280ee88ec7f 100644
--- a/chromium/ui/gl/gl_context_glx.cc
+++ b/chromium/ui/gl/gl_context_glx.cc
@@ -172,9 +172,14 @@ bool GLContextGLX::Initialize(GLSurface* compatible_surface,
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.";
diff --git a/chromium/ui/gl/gl_switches.cc b/chromium/ui/gl/gl_switches.cc
index 5ea1e341f3d..2b28f0122b2 100644
--- a/chromium/ui/gl/gl_switches.cc
+++ b/chromium/ui/gl/gl_switches.cc
@@ -132,6 +132,8 @@ const char* const kGLSwitchesCopiedFromGpuProcessHost[] = {
const int kGLSwitchesCopiedFromGpuProcessHostNumSwitches =
arraysize(kGLSwitchesCopiedFromGpuProcessHost);
+const char kCreateDefaultGLContext[] = "create-default-gl-context";
+
} // namespace switches
namespace features {
diff --git a/chromium/ui/gl/gl_switches.h b/chromium/ui/gl/gl_switches.h
index 404dee8f712..da312131114 100644
--- a/chromium/ui/gl/gl_switches.h
+++ b/chromium/ui/gl/gl_switches.h
@@ -30,7 +30,6 @@ GL_EXPORT extern const char kANGLEImplementationD3D11Name[];
GL_EXPORT extern const char kANGLEImplementationOpenGLName[];
GL_EXPORT extern const char kANGLEImplementationOpenGLESName[];
GL_EXPORT extern const char kANGLEImplementationNullName[];
-
} // namespace gl
namespace switches {
@@ -59,7 +58,7 @@ GL_EXPORT extern const char kOverrideUseSoftwareGLForTests[];
GL_EXPORT extern const char* const kGLSwitchesCopiedFromGpuProcessHost[];
GL_EXPORT extern const int kGLSwitchesCopiedFromGpuProcessHostNumSwitches;
-
+GL_EXPORT extern const char kCreateDefaultGLContext[];
} // namespace switches
namespace features {