summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-07-30 08:47:03 (GMT)
committerAllan Sandfeld Jensen <allan.jensen@digia.com>2014-07-30 12:46:59 (GMT)
commit416272fbc4a6b88433eed7f01a37dd77b02b327f (patch)
treefd993523c5d005bee57caca9f9bcc4c3218baa88 /src/gui
parentc7634050d9675006ceb4dd0c17846d18ec0f24c5 (diff)
downloadQt-416272fbc4a6b88433eed7f01a37dd77b02b327f.zip
Qt-416272fbc4a6b88433eed7f01a37dd77b02b327f.tar.gz
Qt-416272fbc4a6b88433eed7f01a37dd77b02b327f.tar.bz2
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. Backported from change 0afc80c9225ca9630f627fe1aea3d4fd7f958082 in qtbase Task-number: QTBUG-40297 Change-Id: Ib55f7f9294f03a2f81206130e665af452f8cd085 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 5d20cea..a102738 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;
@@ -256,7 +256,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]);