diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-05-29 11:56:16 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-11-09 14:04:13 +0100 |
commit | 04413b9dd8f3983fd5471354a48ad1257ca4f290 (patch) | |
tree | d5483c6d5f07251c18306e7f29ccbe5430b0761c /src/gui/painting/qpaintengine_raster.cpp | |
parent | ccc205bf38ffbe60180a069939a4aff01e7734e5 (diff) |
Allow painting above INT16_MAX on 64-bit architectures
The logic in qgrayraster was ready for it except for an intermediate
format. qrasterizer.cpp and qcosmeticstroker.cpp uses a dot-16 fixed
point format, and had to be changed to handle higher coordinates on
64-bit architectures.
Fixes: QTBUG-84428
Change-Id: I85ab7a04e38bd0dbcefa9f16c16ccc84785a33cf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui/painting/qpaintengine_raster.cpp')
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index a82d8df8b5..b458a2d627 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -4142,10 +4142,10 @@ static void qt_span_fill_clipped(int spanCount, const QSpan *spans, void *userDa static int qt_intersect_spans(QT_FT_Span *&spans, int numSpans, const QRect &clip) { - const short minx = clip.left(); - const short miny = clip.top(); - const short maxx = clip.right(); - const short maxy = clip.bottom(); + const int minx = clip.left(); + const int miny = clip.top(); + const int maxx = clip.right(); + const int maxy = clip.bottom(); QT_FT_Span *end = spans + numSpans; while (spans < end) { @@ -4167,7 +4167,7 @@ static int qt_intersect_spans(QT_FT_Span *&spans, int numSpans, s->len = qMin(s->len - (minx - s->x), maxx - minx + 1); s->x = minx; } else { - s->len = qMin(s->len, ushort(maxx - s->x + 1)); + s->len = qMin(s->len, (maxx - s->x + 1)); } ++s; } |