summaryrefslogtreecommitdiffstats
path: root/src/platformsupport
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@digia.com>2014-06-13 15:10:44 +0200
committerAndras Becsi <andras.becsi@digia.com>2014-06-13 15:18:42 +0200
commitafc8e4cda7493d6e32851ffc36460c5dad14d78b (patch)
treeb92e99cb60037ee11dac68eabcb32e7a4fd48b45 /src/platformsupport
parent201ec532472f59ad8489da053f5160bbf73d5f5e (diff)
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>
Diffstat (limited to 'src/platformsupport')
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformintegration.cpp6
1 files changed, 6 insertions, 0 deletions
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<QEGLPlatformContext *>(context->handle())->eglContext();
break;
+ case EglConfig:
+ if (context->handle())
+ result = static_cast<QEGLPlatformContext *>(context->handle())->eglConfig();
+ break;
default:
break;
}