summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-07-29 12:56:34 +0200
committerAllan Sandfeld Jensen <allan.jensen@digia.com>2014-07-29 15:16:50 +0200
commit0afc80c9225ca9630f627fe1aea3d4fd7f958082 (patch)
tree8d0111ce84921b219bf595b9fa919e1347f99a06 /src/gui
parent7e74f8f398deb8ed84f6c4613de6dab2066dc9de (diff)
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 <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/painting/qblendfunctions_p.h4
1 files changed, 2 insertions, 2 deletions
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<w-7; x+=8) {
blender.write(&dst[x], src[srcx >> 16]); srcx += ix;
@@ -258,7 +258,7 @@ template <typename T> 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<w; ++x) {
blender.write(&dst[x], src[srcx >> 16]);