sw_engien renderer: ++safety

+exceptional handling for the drawing region.
This commit is contained in:
Hermet Park 2021-11-25 15:04:56 +09:00
parent b5e134399d
commit 72ee1c4343

View file

@ -53,6 +53,8 @@ struct SwTask : Task
region.y = bbox.min.y > 0 ? bbox.min.y : 0;
region.w = bbox.max.x - region.x;
region.h = bbox.max.y - region.y;
if (region.w < 0) region.w = 0;
if (region.h < 0) region.h = 0;
return region;
}