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/qpixmap_raster_p.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/qpixmap_raster_p.h')
-rw-r--r-- | src/gui/image/qpixmap_raster_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/image/qpixmap_raster_p.h b/src/gui/image/qpixmap_raster_p.h index cef8821888..b273d65c9f 100644 --- a/src/gui/image/qpixmap_raster_p.h +++ b/src/gui/image/qpixmap_raster_p.h @@ -69,6 +69,7 @@ public: void resize(int width, int height); bool fromData(const uchar *buffer, uint len, const char *format, Qt::ImageConversionFlags flags); void fromImage(const QImage &image, Qt::ImageConversionFlags flags); + void fromImageInPlace(QImage &image, Qt::ImageConversionFlags flags); void fromImageReader(QImageReader *imageReader, Qt::ImageConversionFlags flags); void copy(const QPlatformPixmap *data, const QRect &rect); |