diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2013-12-17 14:20:46 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-02 18:40:11 +0100 |
commit | d5d6e0cf9917c36a93668189014f584e533fc1b9 (patch) | |
tree | f4b3ae477ac137010c50655148ad1f80da48b9c5 /src/gui/image/qplatformpixmap.h | |
parent | c2e2e0151e51b5870f41c993d4c7f3a3c16e5405 (diff) |
RValue ref version of QPixmap::fromImage()
When converting from a temporary image we can use inplace conversion
since we don't have to worry about changes made to the original.
This should give a speedup in several places where QPixmaps are made
from
the return values of methods returning QImages.
Change-Id: I1835bcf3fc061c4dbbb3d0507ec84178dc49b29b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/image/qplatformpixmap.h')
-rw-r--r-- | src/gui/image/qplatformpixmap.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/image/qplatformpixmap.h b/src/gui/image/qplatformpixmap.h index 08e03f10bd..81125bdec4 100644 --- a/src/gui/image/qplatformpixmap.h +++ b/src/gui/image/qplatformpixmap.h @@ -79,6 +79,12 @@ public: virtual void resize(int width, int height) = 0; virtual void fromImage(const QImage &image, Qt::ImageConversionFlags flags) = 0; + virtual void fromImageInPlace(QImage &image, + Qt::ImageConversionFlags flags) + { + fromImage(image, flags); + } + virtual void fromImageReader(QImageReader *imageReader, Qt::ImageConversionFlags flags); |