diff options
author | Liang Qi <liang.qi@qt.io> | 2016-11-08 09:58:52 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-11-08 10:01:50 +0100 |
commit | 9d50df5511e7919d9e03e5f70c693d36af8204f2 (patch) | |
tree | e1e62848dac6297784646666afaee65cb0867545 /src/gui/painting/qdrawhelper.cpp | |
parent | 969bb10eed646313209fcdd9b84605aa98fc88de (diff) | |
parent | e918605f4238841596a1723a0a8592ec152dc723 (diff) |
Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
src/corelib/tools/qalgorithms.h
Change-Id: Ib8ce4d5d9ecd5b9c166d5b8b44e58f3e4e7283ff
Diffstat (limited to 'src/gui/painting/qdrawhelper.cpp')
-rw-r--r-- | src/gui/painting/qdrawhelper.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 2716d92d13..fe1ff6603d 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -4405,8 +4405,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; } @@ -4464,7 +4466,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, @@ -4497,8 +4501,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; } } } |