mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-15 12:34:30 +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
6708fae17b
commit
aa697d9311
1 changed files with 4 additions and 4 deletions
|
@ -314,10 +314,10 @@ bool mathUpdateOutlineBBox(const SwOutline* outline, const SwBBox& clipRegion, S
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fastTrack) {
|
if (fastTrack) {
|
||||||
renderRegion.min.x = static_cast<SwCoord>(nearbyint(xMin / 64.0f));
|
renderRegion.min.x = static_cast<SwCoord>(round(xMin / 64.0f));
|
||||||
renderRegion.max.x = static_cast<SwCoord>(nearbyint(xMax / 64.0f));
|
renderRegion.max.x = static_cast<SwCoord>(round(xMax / 64.0f));
|
||||||
renderRegion.min.y = static_cast<SwCoord>(nearbyint(yMin / 64.0f));
|
renderRegion.min.y = static_cast<SwCoord>(round(yMin / 64.0f));
|
||||||
renderRegion.max.y = static_cast<SwCoord>(nearbyint(yMax / 64.0f));
|
renderRegion.max.y = static_cast<SwCoord>(round(yMax / 64.0f));
|
||||||
} else {
|
} else {
|
||||||
renderRegion.min.x = xMin >> 6;
|
renderRegion.min.x = xMin >> 6;
|
||||||
renderRegion.max.x = (xMax + 63) >> 6;
|
renderRegion.max.x = (xMax + 63) >> 6;
|
||||||
|
|
Loading…
Add table
Reference in a new issue