diff options
author | Jason Barron <jason.barron@nokia.com> | 2010-10-12 08:58:11 (GMT) |
---|---|---|
committer | Jason Barron <jason.barron@nokia.com> | 2010-10-12 09:10:29 (GMT) |
commit | edddadd88950f22f6d813e50acdcf2711d3d5a84 (patch) | |
tree | 3e65804779e09415e69172ffeb2cde62d6b54deb /src/plugins/graphicssystems/openvg | |
parent | 1113344ece060bb7386ea540becbf59f9c8320ea (diff) | |
download | Qt-edddadd88950f22f6d813e50acdcf2711d3d5a84.zip Qt-edddadd88950f22f6d813e50acdcf2711d3d5a84.tar.gz Qt-edddadd88950f22f6d813e50acdcf2711d3d5a84.tar.bz2 |
Add support for Qt::WA_TranslucentBackground with OpenVG on Symbian^3
S^3 does not have a client side API to support semi-transparent EGL
surfaces so if this flag is enabled for a particular widget, then we
should return a raster surface instead of a VG surface. Raster surfaces
can still be semi-transparent but will be slower to render to.
Task-number: QTBUG-14400
Reviewed-by: Jani Hautakangas
Reviewed-by: Gareth Stockwell
Reviewed-by: Sami Merila
Diffstat (limited to 'src/plugins/graphicssystems/openvg')
-rw-r--r-- | src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp b/src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp index 2c7c0b7..9674233 100644 --- a/src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp +++ b/src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp @@ -42,6 +42,9 @@ #include "qgraphicssystem_vg_p.h" #include <QtOpenVG/private/qpixmapdata_vg_p.h> #include <QtOpenVG/private/qwindowsurface_vg_p.h> +#if defined(Q_OS_SYMBIAN) && !defined(Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE) +#include <QtGui/private/qwidget_p.h> +#endif QT_BEGIN_NAMESPACE @@ -64,6 +67,11 @@ QPixmapData *QVGGraphicsSystem::createPixmapData(QPixmapData::PixelType type) co QWindowSurface *QVGGraphicsSystem::createWindowSurface(QWidget *widget) const { +#if defined(Q_OS_SYMBIAN) && !defined(Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE) + QWidgetPrivate *d = qt_widget_private(widget); + if (!d->isOpaque && widget->testAttribute(Qt::WA_TranslucentBackground)) + return d->createDefaultWindowSurface_sys(); +#endif return new QVGWindowSurface(widget); } |