summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2009-04-24 07:26:04 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-04-24 07:27:51 (GMT)
commitf78a8f9c839969d3c3d2e9b4287bc62aa43f5f64 (patch)
tree73398d864bba357f9c75671338e85279ff5b75ac /src
parent7c6ba93ae413309672bb839da2ae1522a170b14d (diff)
downloadQt-f78a8f9c839969d3c3d2e9b4287bc62aa43f5f64.zip
Qt-f78a8f9c839969d3c3d2e9b4287bc62aa43f5f64.tar.gz
Qt-f78a8f9c839969d3c3d2e9b4287bc62aa43f5f64.tar.bz2
Fix clipping bug in raster paint engine
If we have a rect-clip where we actually had spans (used for cleartype) and then reused that clipdata, we would never re-create the spans, which would mean that future drawing would be filtered based on the old clip Reviewed-by: Samuel
Diffstat (limited to 'src')
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index e981f8d..ba1e27c 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -4405,6 +4405,9 @@ void QClipData::fixup()
*/
void QClipData::setClipRect(const QRect &rect)
{
+ if (rect == clipRect)
+ return;
+
// qDebug() << "setClipRect" << clipSpanHeight << count << allocated << rect;
hasRectClip = true;
clipRect = rect;
@@ -4414,6 +4417,11 @@ void QClipData::setClipRect(const QRect &rect)
ymin = qMin(rect.y(), clipSpanHeight);
ymax = qMin(rect.y() + rect.height(), clipSpanHeight);
+ if (m_spans) {
+ delete m_spans;
+ m_spans = 0;
+ }
+
// qDebug() << xmin << xmax << ymin << ymax;
}
@@ -4437,6 +4445,12 @@ void QClipData::setClipRegion(const QRegion &region)
ymin = rect.y();
ymax = rect.y() + rect.height();
}
+
+ if (m_spans) {
+ delete m_spans;
+ m_spans = 0;
+ }
+
}
/*!