summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/eglfs
diff options
context:
space:
mode:
authorAndy Nichols <andy.nichols@qt.io>2016-09-16 11:26:15 +0200
committerAndy Nichols <andy.nichols@qt.io>2016-11-17 15:00:00 +0000
commitdafd0955c601fc00f9164f9b955ec9f28b627565 (patch)
tree16c4c64e9e98d8999880c61728ac30d98ed5ced8 /src/plugins/platforms/eglfs
parent1b905b3fa4955e26b39aaa51b0ca47e9c05e680b (diff)
Enable support for OpenVG
This commit re-enables support for OpenVG in Qt, but not in the same way as in Qt 4.8. The first part is about adding a test and using the new configure system to enable OpenVG. There is still support code in Qt for setting up EGL to provide a surface and context for rendering with the OpenVG API, this commit enables a path to do so. Normally to get access to an EGLContext from a QWindow you do so via QOpenGLContext, but in setups without OpenGL but with EGL and OpenVG this doesn't make sense (there would be no QOpenGLContext). So the intended way is to use a QWindow to get an EGLSurface, then create an EGLContext directly (without going through QPA). Change-Id: I0f75aadbaa3cd006deb7e6fd12cfbb574870fba4 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/plugins/platforms/eglfs')
-rw-r--r--src/plugins/platforms/eglfs/api/qeglfsintegration.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp b/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp
index 7f1da614eb..586c9b2855 100644
--- a/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp
+++ b/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp
@@ -279,7 +279,8 @@ enum ResourceType {
EglConfig,
NativeDisplay,
XlibDisplay,
- WaylandDisplay
+ WaylandDisplay,
+ EglSurface
};
static int resourceType(const QByteArray &key)
@@ -291,7 +292,8 @@ static int resourceType(const QByteArray &key)
QByteArrayLiteral("eglconfig"),
QByteArrayLiteral("nativedisplay"),
QByteArrayLiteral("display"),
- QByteArrayLiteral("server_wl_display")
+ QByteArrayLiteral("server_wl_display"),
+ QByteArrayLiteral("eglsurface")
};
const QByteArray *end = names + sizeof(names) / sizeof(names[0]);
const QByteArray *result = std::find(names, end, key);
@@ -353,6 +355,10 @@ void *QEglFSIntegration::nativeResourceForWindow(const QByteArray &resource, QWi
if (window && window->handle())
result = reinterpret_cast<void*>(static_cast<QEglFSWindow *>(window->handle())->eglWindow());
break;
+ case EglSurface:
+ if (window && window->handle())
+ result = reinterpret_cast<void*>(static_cast<QEglFSWindow *>(window->handle())->surface());
+ break;
default:
break;
}