summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpaintengine_blitter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting/qpaintengine_blitter.cpp')
-rw-r--r--src/gui/painting/qpaintengine_blitter.cpp31
1 files changed, 17 insertions, 14 deletions
diff --git a/src/gui/painting/qpaintengine_blitter.cpp b/src/gui/painting/qpaintengine_blitter.cpp
index 367a8b5..b134d84 100644
--- a/src/gui/painting/qpaintengine_blitter.cpp
+++ b/src/gui/painting/qpaintengine_blitter.cpp
@@ -147,9 +147,9 @@ public:
class QBlitterPaintEnginePrivate : public QPaintEngineExPrivate
{
public:
- QBlitterPaintEnginePrivate(QPaintDevice *p)
- : QPaintEngineExPrivate(),
- raster(new QRasterPaintEngine(p)), isBlitterLocked(false),
+ QBlitterPaintEnginePrivate(QPixmapData *p)
+ : QPaintEngineExPrivate(), pixmap(p),
+ raster(new QRasterPaintEngine(&pixmap)), isBlitterLocked(false),
capabillities(0), hasXForm(false)
{
if (QGraphicsSystem *gs = QApplicationPrivate::graphicsSystem()) {
@@ -235,6 +235,7 @@ public:
raster->d_func()->systemStateChanged();
}
+ QPixmap pixmap;
QRasterPaintEngine *raster;
QRasterPaintEngineState *state;
@@ -246,7 +247,7 @@ public:
uint hasXForm;
};
-QBlitterPaintEngine::QBlitterPaintEngine(QPaintDevice *p)
+QBlitterPaintEngine::QBlitterPaintEngine(QPixmapData *p)
: QPaintEngineEx(*(new QBlitterPaintEnginePrivate(p)))
{
}
@@ -607,23 +608,19 @@ void QBlitterPaintEngine::setState(QPainterState *s)
class QBlittablePrivate
{
public:
+ QBlittablePrivate(const QRect &rect, QBlittable::Capabilities caps)
+ : m_rect(rect), caps(caps)
+ {}
QBlittable::Capabilities caps;
+ QRect m_rect;
};
-QBlittable::QBlittable(Capabilities caps)
- : d_ptr(new QBlittablePrivate)
+QBlittable::QBlittable(const QRect &rect, Capabilities caps)
+ : d_ptr(new QBlittablePrivate(rect,caps))
{
- d_ptr->caps = caps;
}
-QBlittable::QBlittable(QBlittablePrivate &d, Capabilities caps)
- : d_ptr(&d)
-{
- d_ptr->caps = caps;
-}
-
-
QBlittable::~QBlittable()
{
delete d_ptr;
@@ -636,3 +633,9 @@ QBlittable::Capabilities QBlittable::capabilities() const
return d->caps;
}
+QRect QBlittable::rect() const
+{
+ Q_D(const QBlittable);
+ return d->m_rect;
+}
+