summaryrefslogtreecommitdiffstats
path: root/src/openvg/qwindowsurface_vgegl.cpp
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-10-30 13:37:18 +1000
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-10-30 13:37:18 +1000
commitf5589e3b4d352b9b8d9fd54e974d548713e7b640 (patch)
tree0518c43b0d899e13e248cdbe080b4769f4e78b5d /src/openvg/qwindowsurface_vgegl.cpp
parent5641bd0cdd9c90427d7d976473b894c530cdb715 (diff)
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/qwindowsurface_vgegl.cpp')
-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 103f84d2aa..29d82c8350 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);