Add support for querying "eglconfig" from eglfs
This makes it possible to retrieve the EGLConfig used by Qt to create the QOpenGLContext. QtWebEngine needs this to be able to get rid of EGL_BAD_MATCH errors on certain hardware by using the exact same EGLConfig in Chromium as used by Qt. Change-Id: I049c0d8637c44acfe160230e4bb81364d66413ab Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>bb10
parent
201ec53247
commit
afc8e4cda7
|
|
@ -195,6 +195,7 @@ enum ResourceType {
|
|||
EglDisplay,
|
||||
EglWindow,
|
||||
EglContext,
|
||||
EglConfig,
|
||||
NativeDisplay,
|
||||
Display
|
||||
};
|
||||
|
|
@ -205,6 +206,7 @@ static int resourceType(const QByteArray &key)
|
|||
QByteArrayLiteral("egldisplay"),
|
||||
QByteArrayLiteral("eglwindow"),
|
||||
QByteArrayLiteral("eglcontext"),
|
||||
QByteArrayLiteral("eglconfig"),
|
||||
QByteArrayLiteral("nativedisplay"),
|
||||
QByteArrayLiteral("display")
|
||||
};
|
||||
|
|
@ -281,6 +283,10 @@ void *QEGLPlatformIntegration::nativeResourceForContext(const QByteArray &resour
|
|||
if (context->handle())
|
||||
result = static_cast<QEGLPlatformContext *>(context->handle())->eglContext();
|
||||
break;
|
||||
case EglConfig:
|
||||
if (context->handle())
|
||||
result = static_cast<QEGLPlatformContext *>(context->handle())->eglConfig();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue