diff options
author | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2011-04-27 08:05:25 (GMT) |
---|---|---|
committer | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2011-04-27 08:05:25 (GMT) |
commit | 710aa7f8fbd72ee303c3348aa3aaf12d6984964d (patch) | |
tree | 5e8ec704b3a3e44aee0a64df99f28be70f50f2b0 /src/openvg | |
parent | 507a819971cd0cb3d6acba96177ab3553dae9867 (diff) | |
download | Qt-710aa7f8fbd72ee303c3348aa3aaf12d6984964d.zip Qt-710aa7f8fbd72ee303c3348aa3aaf12d6984964d.tar.gz Qt-710aa7f8fbd72ee303c3348aa3aaf12d6984964d.tar.bz2 |
Specify swap behavior preserved bit in openvg engine.
Unlike OpenGL, the EGL_SWAP_BEHAVIOR_PRESERVED_BIT was not set for
the EGL configuration used with OpenVG. Yet the preserved swap was
enabled still, which, according to the EGL spec, should fail. To
make sure it still works with other EGL implementations, the bit
is now set in the configuration.
Reviewed-by: Jani Hautakangas
Diffstat (limited to 'src/openvg')
-rw-r--r-- | src/openvg/qwindowsurface_vgegl.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/openvg/qwindowsurface_vgegl.cpp b/src/openvg/qwindowsurface_vgegl.cpp index 866453f..3205a11 100644 --- a/src/openvg/qwindowsurface_vgegl.cpp +++ b/src/openvg/qwindowsurface_vgegl.cpp @@ -269,19 +269,20 @@ static QEglContext *createContext(QPaintDevice *device) configProps.setPixelFormat(QImage::Format_ARGB32); // XXX configProps.setValue(EGL_ALPHA_MASK_SIZE, 1); #ifdef EGL_VG_ALPHA_FORMAT_PRE_BIT - configProps.setValue(EGL_SURFACE_TYPE, EGL_WINDOW_BIT | - EGL_VG_ALPHA_FORMAT_PRE_BIT); + configProps.setValue(EGL_SURFACE_TYPE, EGL_WINDOW_BIT + | EGL_SWAP_BEHAVIOR_PRESERVED_BIT + | EGL_VG_ALPHA_FORMAT_PRE_BIT); configProps.setRenderableType(QEgl::OpenVG); if (!context->chooseConfig(configProps)) { // Try again without the "pre" bit. - configProps.setValue(EGL_SURFACE_TYPE, EGL_WINDOW_BIT); + configProps.setValue(EGL_SURFACE_TYPE, EGL_WINDOW_BIT | EGL_SWAP_BEHAVIOR_PRESERVED_BIT); if (!context->chooseConfig(configProps)) { delete context; return 0; } } #else - configProps.setValue(EGL_SURFACE_TYPE, EGL_WINDOW_BIT); + configProps.setValue(EGL_SURFACE_TYPE, EGL_WINDOW_BIT | EGL_SWAP_BEHAVIOR_PRESERVED_BIT); configProps.setRenderableType(QEgl::OpenVG); if (!context->chooseConfig(configProps)) { delete context; |