diff options
author | Andy Nichols <andy.nichols@qt.io> | 2016-09-16 11:26:15 +0200 |
---|---|---|
committer | Andy Nichols <andy.nichols@qt.io> | 2016-11-17 15:00:00 +0000 |
commit | dafd0955c601fc00f9164f9b955ec9f28b627565 (patch) | |
tree | 16c4c64e9e98d8999880c61728ac30d98ed5ced8 /src/gui | |
parent | 1b905b3fa4955e26b39aaa51b0ca47e9c05e680b (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/gui')
-rw-r--r-- | src/gui/configure.json | 19 | ||||
-rw-r--r-- | src/gui/kernel/qsurface.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qsurface.h | 3 |
3 files changed, 21 insertions, 3 deletions
diff --git a/src/gui/configure.json b/src/gui/configure.json index f4f099cc23..cc2f0f303b 100644 --- a/src/gui/configure.json +++ b/src/gui/configure.json @@ -32,6 +32,7 @@ "opengl": { "type": "optionalString", "values": [ "no", "yes", "desktop", "es2", "dynamic" ] }, "opengl-es-2": { "type": "void", "name": "opengl", "value": "es2" }, "opengles3": "boolean", + "openvg": "boolean", "qpa": { "type": "string", "name": "qpa_default_platform" }, "qpa-platform-guard": "boolean", "sm": { "type": "boolean", "name": "sessionmanager" }, @@ -193,6 +194,14 @@ { "type": "makeSpec", "spec": "OPENGL_ES2" } ] }, + "openvg": { + "label": "OpenVG", + "test": "unix/openvg", + "sources": [ + { "type": "pkgConfig", "args": "vg" }, + { "type": "makeSpec", "spec": "OPENVG" } + ] + }, "tslib": { "label": "tslib", "test": "unix/tslib", @@ -588,9 +597,14 @@ "condition": "features.opengl-desktop || features.opengl-dynamic || features.opengles2", "output": [ "publicFeature", "feature" ] }, + "openvg": { + "label": "OpenVG", + "condition": "libs.openvg", + "output": [ "publicFeature" ] + }, "egl": { "label": "EGL", - "condition": "features.opengl && (features.angle || libs.egl)", + "condition": "(features.opengl || features.openvg) && (features.angle || libs.egl)", "output": [ "privateFeature", "feature" ] }, "egl_x11": { @@ -1030,6 +1044,8 @@ QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your pla "gif", "ico", "jpeg", "system-jpeg", "png", "system-png" ] }, + "egl", + "openvg", { "section": "OpenGL", "entries": [ @@ -1038,7 +1054,6 @@ QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your pla "args": "angle", "condition": "config.win32" }, - "egl", "opengl-desktop", { "type": "feature", diff --git a/src/gui/kernel/qsurface.cpp b/src/gui/kernel/qsurface.cpp index afe4cf93e1..3cdd11de8c 100644 --- a/src/gui/kernel/qsurface.cpp +++ b/src/gui/kernel/qsurface.cpp @@ -76,6 +76,8 @@ QT_BEGIN_NAMESPACE \value RasterGLSurface The surface can be rendered to using a software rasterizer, and also supports OpenGL. This surface type is intended for internal Qt use, and requires the use of private API. + \value OpenVGSurface The surface is an OpenVG compatible surface and can be used + in conjunction with OpenVG contexts. */ diff --git a/src/gui/kernel/qsurface.h b/src/gui/kernel/qsurface.h index d9ccdc096d..a96b7a6422 100644 --- a/src/gui/kernel/qsurface.h +++ b/src/gui/kernel/qsurface.h @@ -64,7 +64,8 @@ public: enum SurfaceType { RasterSurface, OpenGLSurface, - RasterGLSurface + RasterGLSurface, + OpenVGSurface, }; virtual ~QSurface(); |