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>bb10
parent
ed418f91d5
commit
5b2f77c598
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue