summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2014-09-03 16:10:36 +0200
committerLaszlo Agocs <laszlo.agocs@digia.com>2014-09-03 16:27:52 +0200
commit5b2f77c59839b3d110ca4bf7007e4d5ba513b078 (patch)
tree1c1606dd4d0882418db91765262bddf0df5ceb8c /src
parented418f91d525ccf43362d2bf04fe117d7ebb5570 (diff)
eglfs: Fix regression in config selection
During the introduction of context adoption support the config choosing got broken for context creation, at least for hooks that return a customized format in surfaceFormatFor(). The returned format is the one that needs to be passed to chooseConfig(), not the original. Change-Id: Iae203cbbf7b39c462386611dd3744f048116df13 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/eglfs/qeglfsintegration.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfsintegration.cpp b/src/plugins/platforms/eglfs/qeglfsintegration.cpp
index d770ea763a..82269d07c6 100644
--- a/src/plugins/platforms/eglfs/qeglfsintegration.cpp
+++ b/src/plugins/platforms/eglfs/qeglfsintegration.cpp
@@ -120,13 +120,12 @@ QEGLPlatformContext *QEglFSIntegration::createContext(const QSurfaceFormat &form
QVariant *nativeHandle) const
{
QEglFSContext *ctx;
+ QSurfaceFormat adjustedFormat = QEglFSHooks::hooks()->surfaceFormatFor(format);
if (!nativeHandle || nativeHandle->isNull()) {
- EGLConfig config = QEglFSIntegration::chooseConfig(display, format);
- ctx = new QEglFSContext(QEglFSHooks::hooks()->surfaceFormatFor(format), shareContext, display,
- &config, QVariant());
+ EGLConfig config = QEglFSIntegration::chooseConfig(display, adjustedFormat);
+ ctx = new QEglFSContext(adjustedFormat, shareContext, display, &config, QVariant());
} else {
- ctx = new QEglFSContext(QEglFSHooks::hooks()->surfaceFormatFor(format), shareContext, display,
- 0, *nativeHandle);
+ ctx = new QEglFSContext(adjustedFormat, shareContext, display, 0, *nativeHandle);
}
*nativeHandle = QVariant::fromValue<QEGLNativeContext>(QEGLNativeContext(ctx->eglContext(), display));
return ctx;