diff options
author | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2011-04-27 13:18:58 (GMT) |
---|---|---|
committer | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2011-04-27 13:42:16 (GMT) |
commit | 4a1ae3d1b4e8e032b1c978fcc7e1812e37e1f047 (patch) | |
tree | b63df8bab164144d034b5e0cebc26915cbc591fa /src/openvg/qpaintengine_vg.cpp | |
parent | 710aa7f8fbd72ee303c3348aa3aaf12d6984964d (diff) | |
download | Qt-4a1ae3d1b4e8e032b1c978fcc7e1812e37e1f047.zip Qt-4a1ae3d1b4e8e032b1c978fcc7e1812e37e1f047.tar.gz Qt-4a1ae3d1b4e8e032b1c978fcc7e1812e37e1f047.tar.bz2 |
Make translucent windows working properly with OpenVG.
The OpenVG engine correctly uses vgClear() to fill the surface with
transparent pixels whenever the window has the WA_TranslucentBackground
attribute enabled. However both scissoring and masking affects
the operation of vgClear(). Drawing artifacts were previously
visible due this, simply because scissoring was left enabled by
the VG paint engine, and the filling with transparent pixels
happens in the window surface's beginPaint() that is called
between the paint engine's end() (for the previous paint) and
begin() (for the next paint).
Task-number: QT-4907
Reviewed-by: Jani Hautakangas
Diffstat (limited to 'src/openvg/qpaintengine_vg.cpp')
-rw-r--r-- | src/openvg/qpaintengine_vg.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp index ebdfa5f..648415c 100644 --- a/src/openvg/qpaintengine_vg.cpp +++ b/src/openvg/qpaintengine_vg.cpp @@ -1533,6 +1533,8 @@ bool QVGPaintEngine::begin(QPaintDevice *pdev) bool QVGPaintEngine::end() { + vgSeti(VG_SCISSORING, VG_FALSE); + vgSeti(VG_MASKING, VG_FALSE); return true; } @@ -3759,6 +3761,8 @@ void QVGPaintEngine::beginNativePainting() #if !defined(QVG_NO_DRAW_GLYPHS) d->setTransform(VG_MATRIX_GLYPH_USER_TO_SURFACE, d->pathTransform); #endif + vgSeti(VG_SCISSORING, VG_FALSE); + vgSeti(VG_MASKING, VG_FALSE); d->rawVG = true; } @@ -3819,6 +3823,7 @@ void QVGPaintEngine::restoreState(QPaintEngine::DirtyFlags dirty) if ((dirty & QPaintEngine::DirtyBrushOrigin) != 0) brushOriginChanged(); d->fillRule = 0; + d->clearColor = QColor(); if ((dirty & QPaintEngine::DirtyOpacity) != 0) opacityChanged(); if ((dirty & QPaintEngine::DirtyTransform) != 0) |