diff options
author | Liang Qi <liang.qi@qt.io> | 2018-03-28 12:30:12 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2018-03-28 12:30:12 +0000 |
commit | 40011193f42a591c1fe5b1029764895eeed71b1f (patch) | |
tree | 22e23d80f30cd310832ad71334a445df92358ed1 /src/gui/painting/qdrawhelper_sse2.cpp | |
parent | 48cca518dfa1feff03572550068c9a50a5051830 (diff) | |
parent | 794781e7cff9f7d44af64292796428478ed18663 (diff) |
Merge "Merge remote-tracking branch 'origin/5.11' into dev" into refs/staging/dev
Diffstat (limited to 'src/gui/painting/qdrawhelper_sse2.cpp')
-rw-r--r-- | src/gui/painting/qdrawhelper_sse2.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/painting/qdrawhelper_sse2.cpp b/src/gui/painting/qdrawhelper_sse2.cpp index bfe2080298..3212ffdd2d 100644 --- a/src/gui/painting/qdrawhelper_sse2.cpp +++ b/src/gui/painting/qdrawhelper_sse2.cpp @@ -558,6 +558,16 @@ void qt_scale_image_argb32_on_argb32_sse2(uchar *destPixels, int dbpl, // this bounds check here is required as floating point rounding above might in some cases lead to // w/h values that are one pixel too large, falling outside of the valid image area. + const int ystart = srcy >> 16; + if (ystart >= srch && iy < 0) { + srcy += iy; + --h; + } + const int xstart = basex >> 16; + if (xstart >= (int)(sbpl/sizeof(quint32)) && ix < 0) { + basex += ix; + --w; + } int yend = (srcy + iy * (h - 1)) >> 16; if (yend < 0 || yend >= srch) --h; |