From 0afc80c9225ca9630f627fe1aea3d4fd7f958082 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 29 Jul 2014 12:56:34 +0200 Subject: Don't convert signed to unsigned when we need all 32bit The fast scale methods qt_scale_image_16bit and qt_scale_image_32bit were incorrectly assigning an unsigned value to a signed variable, which broke their support of images with dimensions from 32384 to 65535. Images with dimensions higher than that are already using another code- path. Task-number: QTBUG-40297 Change-Id: I8c971889e069381224cea2befbb5c66cd93ea5c2 Reviewed-by: Gunnar Sletta --- src/gui/painting/qblendfunctions_p.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gui/painting/qblendfunctions_p.h b/src/gui/painting/qblendfunctions_p.h index 98e9e10bd8..e08c74ab88 100644 --- a/src/gui/painting/qblendfunctions_p.h +++ b/src/gui/painting/qblendfunctions_p.h @@ -147,7 +147,7 @@ void qt_scale_image_16bit(uchar *destPixels, int dbpl, while (h--) { const SRC *src = (const SRC *) (srcPixels + (srcy >> 16) * sbpl); - int srcx = basex; + quint32 srcx = basex; int x = 0; for (; x> 16]); srcx += ix; @@ -258,7 +258,7 @@ template void qt_scale_image_32bit(uchar *destPixels, int dbpl, while (h--) { const uint *src = (const quint32 *) (srcPixels + (srcy >> 16) * sbpl); - int srcx = basex; + quint32 srcx = basex; int x = 0; for (; x> 16]); -- cgit v1.2.3