summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/painting/qblittable.cpp6
-rw-r--r--src/gui/painting/qblittable_p.h2
-rw-r--r--src/gui/painting/qpaintengine_blitter.cpp14
3 files changed, 11 insertions, 11 deletions
diff --git a/src/gui/painting/qblittable.cpp b/src/gui/painting/qblittable.cpp
index a64396a..f7d994e 100644
--- a/src/gui/painting/qblittable.cpp
+++ b/src/gui/painting/qblittable.cpp
@@ -80,6 +80,12 @@ QSize QBlittable::size() const
return d->m_size;
}
+bool QBlittable::isLocked() const
+{
+ Q_D(const QBlittable);
+ return d->locked;
+}
+
QImage *QBlittable::lock()
{
Q_D(QBlittable);
diff --git a/src/gui/painting/qblittable_p.h b/src/gui/painting/qblittable_p.h
index 2c7de9c..711c6b7 100644
--- a/src/gui/painting/qblittable_p.h
+++ b/src/gui/painting/qblittable_p.h
@@ -77,6 +77,8 @@ public:
virtual void fillRect(const QRectF &rect, const QColor &color) = 0;
virtual void drawPixmap(const QRectF &rect, const QPixmap &pixmap, const QRectF &subrect) = 0;
+ bool isLocked() const;
+
QImage *lock();
void unlock();
diff --git a/src/gui/painting/qpaintengine_blitter.cpp b/src/gui/painting/qpaintengine_blitter.cpp
index 1b7030f..e6b1060 100644
--- a/src/gui/painting/qpaintengine_blitter.cpp
+++ b/src/gui/painting/qpaintengine_blitter.cpp
@@ -189,7 +189,6 @@ public:
: QPaintEngineExPrivate()
, pmData(p)
, caps(pmData->blittable()->capabilities())
- , isBlitterLocked(false)
, hasXForm(false)
{
@@ -197,17 +196,12 @@ public:
}
inline void lock() {
- if (!isBlitterLocked) {
- raster->d_func()->rasterBuffer->prepare(pmData->blittable()->lock());
- isBlitterLocked = true;
- }
+ if (!pmData->blittable()->isLocked())
+ raster->d_func()->rasterBuffer->prepare(pmData->buffer());
}
inline void unlock() {
- if (isBlitterLocked) {
- pmData->blittable()->unlock();
- isBlitterLocked = false;
- }
+ pmData->blittable()->unlock();
}
void fillRect(const QRectF &rect, const QColor &color) {
@@ -276,8 +270,6 @@ public:
QBlittablePixmapData *pmData;
CapabilitiesToStateMask caps;
- bool isBlitterLocked;
-
uint hasXForm;
};