diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2010-06-17 08:59:31 (GMT) |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2010-06-17 13:10:43 (GMT) |
commit | 21f5de51e0c49006f5be75ef64675145b9d8b5c3 (patch) | |
tree | 15e7b34823414eea0e4391366de262c4484e65bd /src/gui/image/qpixmapdata.cpp | |
parent | 4cdeac4d4780e163eee3a1916683766f16747f90 (diff) | |
download | Qt-21f5de51e0c49006f5be75ef64675145b9d8b5c3.zip Qt-21f5de51e0c49006f5be75ef64675145b9d8b5c3.tar.gz Qt-21f5de51e0c49006f5be75ef64675145b9d8b5c3.tar.bz2 |
Don't do opaque detection when copying a sub-rect of a QPixmap.
If the pixmap is non-opaque in the first place most likely a reasonably
sized sub-rect is also non-opaque, so this check is a waste in 90 % of
the cases.
Reviewed-by: Gunnar Sletta
Diffstat (limited to 'src/gui/image/qpixmapdata.cpp')
-rw-r--r-- | src/gui/image/qpixmapdata.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/image/qpixmapdata.cpp b/src/gui/image/qpixmapdata.cpp index ea4fe6b..31ca909 100644 --- a/src/gui/image/qpixmapdata.cpp +++ b/src/gui/image/qpixmapdata.cpp @@ -146,7 +146,7 @@ bool QPixmapData::fromData(const uchar *buf, uint len, const char *format, Qt::I void QPixmapData::copy(const QPixmapData *data, const QRect &rect) { - fromImage(data->toImage().copy(rect), Qt::AutoColor); + fromImage(data->toImage().copy(rect), Qt::NoOpaqueDetection); } bool QPixmapData::scroll(int dx, int dy, const QRect &rect) |