diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-02-23 17:11:05 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-03-27 09:13:09 +0000 |
commit | bce063054682e590e9fa8aa9d2ec19ca26ea3d49 (patch) | |
tree | 72eafcf4e0d2c6518ffd38772f7f5758bf6a4137 /src/core/gl_context_qt.cpp | |
parent | 817c117cf89f15e1877107597c8daeff956fd1a6 (diff) |
Adaptations for Chromium 56
Change-Id: I78240d7956de4716757761fc6517f031b4adb822
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
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 { |