diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2009-04-24 07:26:04 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-04-24 07:27:51 (GMT) |
commit | f78a8f9c839969d3c3d2e9b4287bc62aa43f5f64 (patch) | |
tree | 73398d864bba357f9c75671338e85279ff5b75ac /src/gui/painting | |
parent | 7c6ba93ae413309672bb839da2ae1522a170b14d (diff) | |
download | Qt-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/gui/painting')
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 14 |
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 ®ion) ymin = rect.y(); ymax = rect.y() + rect.height(); } + + if (m_spans) { + delete m_spans; + m_spans = 0; + } + } /*! |