summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpaintengine_raster.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2009-04-24 11:37:25 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-04-24 12:43:52 (GMT)
commitae3c71bcc588f4b11158cb943c7dd453f066efc6 (patch)
tree1d1258ae18b88e37106faaa2369ed810c909c19a /src/gui/painting/qpaintengine_raster.cpp
parent8d93fb9149d20eb6110649c9fab2d0ef25960ccf (diff)
downloadQt-ae3c71bcc588f4b11158cb943c7dd453f066efc6.zip
Qt-ae3c71bcc588f4b11158cb943c7dd453f066efc6.tar.gz
Qt-ae3c71bcc588f4b11158cb943c7dd453f066efc6.tar.bz2
Fix crash caused by clip(QRegion) in raster now depending on baseclip
This was introduced by my recent implementation...
Diffstat (limited to 'src/gui/painting/qpaintengine_raster.cpp')
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 20cea08..f950bad 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -362,7 +362,8 @@ void QRasterPaintEngine::init()
d->basicStroker.setCubicToHook(qt_ft_outline_cubic_to);
d->dashStroker = 0;
- d->baseClip = 0;
+ d->baseClip = new QClipData(d->device->height());
+ d->baseClip->setClipRect(QRect(0, 0, d->device->width(), d->device->height()));
d->image_filler.init(d->rasterBuffer, this);
d->image_filler.type = QSpanData::Texture;
@@ -446,6 +447,8 @@ QRasterPaintEngine::~QRasterPaintEngine()
delete d->outlineMapper;
delete d->rasterizer;
delete d->dashStroker;
+
+ delete d->baseClip;
}
/*!
@@ -541,11 +544,6 @@ bool QRasterPaintEngine::end()
}
#endif
- if (d->baseClip) {
- delete d->baseClip;
- d->baseClip = 0;
- }
-
return true;
}
@@ -1099,11 +1097,10 @@ void QRasterPaintEnginePrivate::systemStateChanged()
if (!systemClip.isEmpty()) {
QRegion clippedDeviceRgn = systemClip & clipRect;
deviceRect = clippedDeviceRgn.boundingRect();
- delete baseClip;
- baseClip = new QClipData(device->height());
baseClip->setClipRegion(clippedDeviceRgn);
} else {
deviceRect = clipRect;
+ baseClip->setClipRect(deviceRect);
}
#ifdef QT_DEBUG_DRAW
qDebug() << "systemStateChanged" << this << "deviceRect" << deviceRect << clipRect << systemClip;