From afc8e4cda7493d6e32851ffc36460c5dad14d78b Mon Sep 17 00:00:00 2001 From: Andras Becsi Date: Fri, 13 Jun 2014 15:10:44 +0200 Subject: [PATCH] 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 --- .../eglconvenience/qeglplatformintegration.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/platformsupport/eglconvenience/qeglplatformintegration.cpp b/src/platformsupport/eglconvenience/qeglplatformintegration.cpp index 560ff79ef8..4e4860db9a 100644 --- a/src/platformsupport/eglconvenience/qeglplatformintegration.cpp +++ b/src/platformsupport/eglconvenience/qeglplatformintegration.cpp @@ -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(context->handle())->eglContext(); break; + case EglConfig: + if (context->handle()) + result = static_cast(context->handle())->eglConfig(); + break; default: break; }