8240119: Less Affine Transformations

Reviewed-by: serb, bpb, mschoene, rhalade
This commit is contained in:
Phil Race 2020-03-17 13:46:19 -07:00
parent 45cace2867
commit 800f133a29

View File

@ -415,7 +415,9 @@ mlib_status mlib_AffineEdges(mlib_affine_param *param,
if ((dxs < dxCl) || (dxs >= dwCl) || (dys < dyCl) || (dys >= dhCl)) { if ((dxs < dxCl) || (dxs >= dwCl) || (dys < dyCl) || (dys >= dhCl)) {
dxs += dx; dxs += dx;
dys += dy; dys += dy;
xLeft++; if (xLeft < MLIB_S32_MAX) {
xLeft++;
}
if ((dxs < dxCl) || (dxs >= dwCl) || (dys < dyCl) || (dys >= dhCl)) if ((dxs < dxCl) || (dxs >= dwCl) || (dys < dyCl) || (dys >= dhCl))
xRight = -1; xRight = -1;
@ -427,7 +429,9 @@ mlib_status mlib_AffineEdges(mlib_affine_param *param,
if ((dxe < dxCl) || (dxe >= dwCl) || (dye < dyCl) || (dye >= dhCl)) { if ((dxe < dxCl) || (dxe >= dwCl) || (dye < dyCl) || (dye >= dhCl)) {
dxe -= dx; dxe -= dx;
dye -= dy; dye -= dy;
xRight--; if (xRight > MLIB_S32_MIN) {
xRight--;
}
if ((dxe < dxCl) || (dxe >= dwCl) || (dye < dyCl) || (dye >= dhCl)) if ((dxe < dxCl) || (dxe >= dwCl) || (dye < dyCl) || (dye >= dhCl))
xRight = -1; xRight = -1;
@ -498,7 +502,9 @@ mlib_status mlib_AffineEdges(mlib_affine_param *param,
if ((dxs > dxCl) || (dxs <= dwCl) || (dys > dyCl) || (dys <= dhCl)) { if ((dxs > dxCl) || (dxs <= dwCl) || (dys > dyCl) || (dys <= dhCl)) {
dxs += dx; dxs += dx;
dys += dy; dys += dy;
xLeft++; if (xLeft < MLIB_S32_MAX) {
xLeft++;
}
if ((dxs > dxCl) || (dxs <= dwCl) || (dys > dyCl) || (dys <= dhCl)) if ((dxs > dxCl) || (dxs <= dwCl) || (dys > dyCl) || (dys <= dhCl))
xRight = -1; xRight = -1;
@ -510,7 +516,9 @@ mlib_status mlib_AffineEdges(mlib_affine_param *param,
if ((dxe > dxCl) || (dxe <= dwCl) || (dye > dyCl) || (dye <= dhCl)) { if ((dxe > dxCl) || (dxe <= dwCl) || (dye > dyCl) || (dye <= dhCl)) {
dxe -= dx; dxe -= dx;
dye -= dy; dye -= dy;
xRight--; if (xRight > MLIB_S32_MIN) {
xRight--;
}
if ((dxe > dxCl) || (dxe <= dwCl) || (dye > dyCl) || (dye <= dhCl)) if ((dxe > dxCl) || (dxe <= dwCl) || (dye > dyCl) || (dye <= dhCl))
xRight = -1; xRight = -1;