diff options
Diffstat (limited to 'src/core/gl_context_qt.cpp')
-rw-r--r-- | src/core/gl_context_qt.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
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<GLContext> CreateGLContext(GLShareGroup* share_group, GLSurface* compatible_surface, GpuPreference gpu_preference) +scoped_refptr<GLContext> CreateGLContext(GLShareGroup* share_group, + GLSurface* compatible_surface, + const GLContextAttribs& attribs) { #if defined(OS_WIN) scoped_refptr<GLContext> 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 { |