summaryrefslogtreecommitdiffstats
path: root/src/openvg
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-10-30 03:37:18 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-10-30 03:37:18 (GMT)
commitf5589e3b4d352b9b8d9fd54e974d548713e7b640 (patch)
tree0518c43b0d899e13e248cdbe080b4769f4e78b5d /src/openvg
parent5641bd0cdd9c90427d7d976473b894c530cdb715 (diff)
downloadQt-f5589e3b4d352b9b8d9fd54e974d548713e7b640.zip
Qt-f5589e3b4d352b9b8d9fd54e974d548713e7b640.tar.gz
Qt-f5589e3b4d352b9b8d9fd54e974d548713e7b640.tar.bz2
Make it possible to set the OpenVG swap interval
The QT_VG_SWAP_INTERVAL environment variable can be used to specify a value for eglSwapInterval(). Task-number: QT-2409 Reviewed-by: trustme
Diffstat (limited to 'src/openvg')
-rw-r--r--src/openvg/qwindowsurface_vgegl.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/openvg/qwindowsurface_vgegl.cpp b/src/openvg/qwindowsurface_vgegl.cpp
index 103f84d..29d82c8 100644
--- a/src/openvg/qwindowsurface_vgegl.cpp
+++ b/src/openvg/qwindowsurface_vgegl.cpp
@@ -193,6 +193,13 @@ static QEglContext *createContext(QPaintDevice *device)
return 0;
}
+ // Set the swap interval for the display.
+ QByteArray interval = qgetenv("QT_VG_SWAP_INTERVAL");
+ if (!interval.isEmpty())
+ eglSwapInterval(context->display(), interval.toInt());
+ else
+ eglSwapInterval(context->display(), 1);
+
// Choose an appropriate configuration for rendering into the device.
QEglProperties configProps;
configProps.setPaintDeviceFormat(device);