summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qpixmapdata_p.h
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2010-06-22 11:24:26 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2010-06-23 08:45:11 (GMT)
commitfb76a872e20bd0df8e7bbe9c039b7f20423c6f12 (patch)
treec01d5f47cad65a056eb6edc1cab11c628b11e2f8 /src/gui/image/qpixmapdata_p.h
parenteaf886318568bfbd9aa1722586264c8fdf90df12 (diff)
downloadQt-fb76a872e20bd0df8e7bbe9c039b7f20423c6f12.zip
Qt-fb76a872e20bd0df8e7bbe9c039b7f20423c6f12.tar.gz
Qt-fb76a872e20bd0df8e7bbe9c039b7f20423c6f12.tar.bz2
Optimized sub-rect copying / painting of QPixmaps.
Prevented downloading of the whole XImage by introducing new QPixmapData::toImage() overload taking a sub-rect. Also avoid an additional copy by simply taking ownership of the XImage data when the XImage format matches the QImage format. Reviewed-by: Trond
Diffstat (limited to 'src/gui/image/qpixmapdata_p.h')
-rw-r--r--src/gui/image/qpixmapdata_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/image/qpixmapdata_p.h b/src/gui/image/qpixmapdata_p.h
index 60ed26a..9a1505a 100644
--- a/src/gui/image/qpixmapdata_p.h
+++ b/src/gui/image/qpixmapdata_p.h
@@ -102,6 +102,7 @@ public:
virtual void setAlphaChannel(const QPixmap &alphaChannel);
virtual QPixmap alphaChannel() const;
virtual QImage toImage() const = 0;
+ virtual QImage toImage(const QRect &rect) const;
virtual QPaintEngine* paintEngine() const = 0;
inline int serialNumber() const { return ser_no; }