From 21f5de51e0c49006f5be75ef64675145b9d8b5c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 17 Jun 2010 10:59:31 +0200 Subject: 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 --- src/gui/image/qpixmapdata.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v0.12