summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qdrawhelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting/qdrawhelper.cpp')
-rw-r--r--src/gui/painting/qdrawhelper.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 1c772ef232..2c810e4870 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -4508,8 +4508,10 @@ static void blend_tiled_argb(int count, const QSpan *spans, void *userData)
uint *dest = ((uint *)data->rasterBuffer->scanLine(spans->y)) + x;
op.func(dest, src, l, coverage);
x += l;
+ sx += l;
length -= l;
- sx = 0;
+ if (sx >= image_width)
+ sx = 0;
}
++spans;
}
@@ -4567,7 +4569,9 @@ static void blend_tiled_rgb565(int count, const QSpan *spans, void *userData)
memcpy(dest, src, l * sizeof(quint16));
length -= l;
tx += l;
- sx = 0;
+ sx += l;
+ if (sx >= image_width)
+ sx = 0;
}
// Now use the rasterBuffer as the source of the texture,
@@ -4600,8 +4604,10 @@ static void blend_tiled_rgb565(int count, const QSpan *spans, void *userData)
const quint16 *src = (const quint16 *)data->texture.scanLine(sy) + sx;
blend_sourceOver_rgb16_rgb16(dest, src, l, alpha, ialpha);
x += l;
+ sx += l;
length -= l;
- sx = 0;
+ if (sx >= image_width)
+ sx = 0;
}
}
}