Avoid coverage overflow
We end up excluding more than 65536 from 65536 of rowHeight. Perhaps better fixed earlier, but I can't figure this logic out right now. Change-Id: I5721c469441f15ac112180f971c857cd67edbf96 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 036c13a0f48ea964da36c6ac01b379d9aa52fdc1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
154d4b3fe0
commit
3801808ade
@ -1096,6 +1096,8 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width,
|
|||||||
bottomRightIntersectBf, topRightIntersectBf,
|
bottomRightIntersectBf, topRightIntersectBf,
|
||||||
bottomRightSlopeFP, invBottomRightSlopeFP);
|
bottomRightSlopeFP, invBottomRightSlopeFP);
|
||||||
}
|
}
|
||||||
|
if (excluded > QScFixedFactor)
|
||||||
|
excluded = excluded % QScFixedFactor;
|
||||||
|
|
||||||
QScFixed coverage = rowHeight - excluded;
|
QScFixed coverage = rowHeight - excluded;
|
||||||
buffer.addSpan(x, 1, QScFixedToInt(yFP),
|
buffer.addSpan(x, 1, QScFixedToInt(yFP),
|
||||||
@ -1117,6 +1119,8 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width,
|
|||||||
excluded += (rowBottom - rowTopRight) - intersectPixelFP(x, rowTopRight, rowBottom,
|
excluded += (rowBottom - rowTopRight) - intersectPixelFP(x, rowTopRight, rowBottom,
|
||||||
bottomRightIntersectBf, topRightIntersectBf,
|
bottomRightIntersectBf, topRightIntersectBf,
|
||||||
bottomRightSlopeFP, invBottomRightSlopeFP);
|
bottomRightSlopeFP, invBottomRightSlopeFP);
|
||||||
|
if (excluded > QScFixedFactor)
|
||||||
|
excluded = excluded % QScFixedFactor;
|
||||||
|
|
||||||
QScFixed coverage = rowHeight - excluded;
|
QScFixed coverage = rowHeight - excluded;
|
||||||
buffer.addSpan(x, 1, QScFixedToInt(yFP),
|
buffer.addSpan(x, 1, QScFixedToInt(yFP),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user