summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-04-27 13:02:32 (GMT)
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-04-27 13:43:31 (GMT)
commitd45ec470519d1075ebf299b74cbb846a0c7d99af (patch)
tree8c20e535f97ed669e0553e7aa2f9cb4a03965a82 /src/gui/image
parent4a1ae3d1b4e8e032b1c978fcc7e1812e37e1f047 (diff)
downloadQt-d45ec470519d1075ebf299b74cbb846a0c7d99af.zip
Qt-d45ec470519d1075ebf299b74cbb846a0c7d99af.tar.gz
Qt-d45ec470519d1075ebf299b74cbb846a0c7d99af.tar.bz2
Upload VGImage data when drawing pixmaps that are being painted into.
When a painter is open on a pixmap's underlying QVolatileImage, it is better to upload the VGImage content every time the pixmap is drawn on the screen, in order to enable showing animations that are created by continously rendering into the same pixmap and keeping the same painter open. Task-number: QT-4002 Reviewed-by: Jason Barron
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qvolatileimage.cpp5
-rw-r--r--src/gui/image/qvolatileimage_p.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/image/qvolatileimage.cpp b/src/gui/image/qvolatileimage.cpp
index 098e9a1..f5076e1 100644
--- a/src/gui/image/qvolatileimage.cpp
+++ b/src/gui/image/qvolatileimage.cpp
@@ -103,6 +103,11 @@ QVolatileImage &QVolatileImage::operator=(const QVolatileImage &rhs)
return *this;
}
+bool QVolatileImage::paintingActive() const
+{
+ return d->pengine && d->pengine->isActive();
+}
+
bool QVolatileImage::isNull() const
{
return d->image.isNull();
diff --git a/src/gui/image/qvolatileimage_p.h b/src/gui/image/qvolatileimage_p.h
index fc5d6b1..d835f45 100644
--- a/src/gui/image/qvolatileimage_p.h
+++ b/src/gui/image/qvolatileimage_p.h
@@ -71,6 +71,7 @@ public:
~QVolatileImage();
QVolatileImage &operator=(const QVolatileImage &rhs);
+ bool paintingActive() const;
bool isNull() const;
QImage::Format format() const;
int width() const;