mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
sw_engine: hotfix a out of bound image access.
this simply revert logic from the previous change: https://github.com/thorvg/thorvg/pull/2552 issue: https://github.com/thorvg/thorvg/issues/3327
This commit is contained in:
parent
56d5396b7a
commit
be0cbc356a
1 changed files with 11 additions and 4 deletions
|
@ -309,10 +309,17 @@ bool mathUpdateOutlineBBox(const SwOutline* outline, const SwBBox& clipRegion, S
|
||||||
if (yMax < pt->y) yMax = pt->y;
|
if (yMax < pt->y) yMax = pt->y;
|
||||||
}
|
}
|
||||||
|
|
||||||
renderRegion.min.x = xMin >> 6;
|
if (fastTrack) {
|
||||||
renderRegion.max.x = (xMax + 63) >> 6;
|
renderRegion.min.x = static_cast<SwCoord>(round(xMin / 64.0f));
|
||||||
renderRegion.min.y = yMin >> 6;
|
renderRegion.max.x = static_cast<SwCoord>(round(xMax / 64.0f));
|
||||||
renderRegion.max.y = (yMax + 63) >> 6;
|
renderRegion.min.y = static_cast<SwCoord>(round(yMin / 64.0f));
|
||||||
|
renderRegion.max.y = static_cast<SwCoord>(round(yMax / 64.0f));
|
||||||
|
} else {
|
||||||
|
renderRegion.min.x = xMin >> 6;
|
||||||
|
renderRegion.max.x = (xMax + 63) >> 6;
|
||||||
|
renderRegion.min.y = yMin >> 6;
|
||||||
|
renderRegion.max.y = (yMax + 63) >> 6;
|
||||||
|
}
|
||||||
|
|
||||||
return mathClipBBox(clipRegion, renderRegion);
|
return mathClipBBox(clipRegion, renderRegion);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue