summaryrefslogtreecommitdiffstats
path: root/src/core/gl_context_qt.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-04-11 09:50:38 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-06-14 12:41:31 +0000
commitdee6ffb0eb3b133d38f09a2f7dd915aee8c289e7 (patch)
tree5e0c1a9cb6d7cce41bc24b078eb9b7f8c5e4b745 /src/core/gl_context_qt.cpp
parentd42caf438cf240c0ad1f803320f9063d6108a0aa (diff)
Graphics adaptations for Chromium 58
Change-Id: I66262ce7943bd5ba98defff5e4a33063b2ed0353 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'src/core/gl_context_qt.cpp')
-rw-r--r--src/core/gl_context_qt.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/core/gl_context_qt.cpp b/src/core/gl_context_qt.cpp
index 8f812a9cb..cd82b1069 100644
--- a/src/core/gl_context_qt.cpp
+++ b/src/core/gl_context_qt.cpp
@@ -93,21 +93,20 @@ void GLContextHelper::destroy()
contextHelper = 0;
}
-bool GLContextHelper::initializeContextOnBrowserThread(gl::GLContext* context, gl::GLSurface* surface)
+bool GLContextHelper::initializeContextOnBrowserThread(gl::GLContext* context, gl::GLSurface* surface, gl::GLContextAttribs attribs)
{
- gl::GLContextAttribs attribs;
- attribs.gpu_preference = gl::PreferDiscreteGpu;
return context->Initialize(surface, attribs);
}
-bool GLContextHelper::initializeContext(gl::GLContext* context, gl::GLSurface* surface)
+bool GLContextHelper::initializeContext(gl::GLContext* context, gl::GLSurface* surface, gl::GLContextAttribs attribs)
{
bool ret = false;
Qt::ConnectionType connType = (QThread::currentThread() == qApp->thread()) ? Qt::DirectConnection : Qt::BlockingQueuedConnection;
QMetaObject::invokeMethod(contextHelper, "initializeContextOnBrowserThread", connType,
Q_RETURN_ARG(bool, ret),
Q_ARG(gl::GLContext*, context),
- Q_ARG(gl::GLSurface*, surface));
+ Q_ARG(gl::GLSurface*, surface),
+ Q_ARG(gl::GLContextAttribs, attribs));
return ret;
}
@@ -171,7 +170,7 @@ scoped_refptr<GLContext> CreateGLContext(GLShareGroup* share_group,
scoped_refptr<GLContext> context = new GLContextEGL(share_group);
#endif
- if (!GLContextHelper::initializeContext(context.get(), compatible_surface))
+ if (!GLContextHelper::initializeContext(context.get(), compatible_surface, attribs))
return NULL;
return context;