From 4f48c856f6f965390e198c2a6c52cdb99e287bf7 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Tue, 23 Jun 2020 14:14:47 +0900 Subject: [PATCH] sw_engie: fix wrong boundary check. this bounding box max indicates absolute positions, not width/height size. because of this, shape couldn't rendered properly, when it's clipped out. Change-Id: I0afb0d6e63d1b511b83716c55f55e3fd5370fdb8 --- src/lib/sw_engine/tvgSwShape.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lib/sw_engine/tvgSwShape.cpp b/src/lib/sw_engine/tvgSwShape.cpp index 723650b..22fed2c 100644 --- a/src/lib/sw_engine/tvgSwShape.cpp +++ b/src/lib/sw_engine/tvgSwShape.cpp @@ -225,9 +225,7 @@ static bool _checkValid(const SwOutline* outline, const SwBBox& bbox, const SwSi if (outline->ptsCnt == 0 || outline->cntrsCnt <= 0) return false; //Check boundary - if ((bbox.min.x > clip.w || bbox.min.y > clip.h) || - (bbox.min.x + bbox.max.x < 0) || - (bbox.min.y + bbox.max.y < 0)) return false; + if (bbox.min.x >= clip.w || bbox.min.y >= clip.h || bbox.max.x <= 0 || bbox.max.y <= 0) return false; return true; } -- 2.7.4