From bce063054682e590e9fa8aa9d2ec19ca26ea3d49 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 23 Feb 2017 17:11:05 +0100 Subject: Adaptations for Chromium 56 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I78240d7956de4716757761fc6517f031b4adb822 Reviewed-by: Michael BrĂ¼ning --- src/core/gl_context_qt.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/core/gl_context_qt.cpp') diff --git a/src/core/gl_context_qt.cpp b/src/core/gl_context_qt.cpp index a1855b060..8f812a9cb 100644 --- a/src/core/gl_context_qt.cpp +++ b/src/core/gl_context_qt.cpp @@ -95,7 +95,9 @@ void GLContextHelper::destroy() bool GLContextHelper::initializeContextOnBrowserThread(gl::GLContext* context, gl::GLSurface* surface) { - return context->Initialize(surface, gl::PreferDiscreteGpu); + gl::GLContextAttribs attribs; + attribs.gpu_preference = gl::PreferDiscreteGpu; + return context->Initialize(surface, attribs); } bool GLContextHelper::initializeContext(gl::GLContext* context, gl::GLSurface* surface) @@ -151,13 +153,15 @@ namespace gl { namespace init { -scoped_refptr CreateGLContext(GLShareGroup* share_group, GLSurface* compatible_surface, GpuPreference gpu_preference) +scoped_refptr CreateGLContext(GLShareGroup* share_group, + GLSurface* compatible_surface, + const GLContextAttribs& attribs) { #if defined(OS_WIN) scoped_refptr context; if (GetGLImplementation() == kGLImplementationDesktopGL) { context = new GLContextWGL(share_group); - if (!context->Initialize(compatible_surface, gpu_preference)) + if (!context->Initialize(compatible_surface, attribs)) return nullptr; return context; } else { -- cgit v1.2.3