From ea55ea8a5fafb075b41a750867c42bf15eb4a420 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Fri, 26 Nov 2021 20:05:48 +0900 Subject: [PATCH] sw_engine texmap: remove unnecessary conditions. remove exceptional handling for the performance. --- src/lib/sw_engine/tvgSwRasterTexmapInternal.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/lib/sw_engine/tvgSwRasterTexmapInternal.h b/src/lib/sw_engine/tvgSwRasterTexmapInternal.h index d7084bc..c30186b 100644 --- a/src/lib/sw_engine/tvgSwRasterTexmapInternal.h +++ b/src/lib/sw_engine/tvgSwRasterTexmapInternal.h @@ -72,14 +72,6 @@ while (x++ < x2) { uu = (int) u; vv = (int) v; - /* FIXME: sometimes u and v are < 0 - don'tc crash */ - if (uu < 0) uu = 0; - if (vv < 0) vv = 0; - - /* Range exception handling */ - /* OPTIMIZE ME, handle in advance? */ - if (uu >= sw) uu = sw - 1; - if (vv >= sh) vv = sh - 1; ar = (int)(255 * (1 - modff(u, &iptr))); ab = (int)(255 * (1 - modff(v, &iptr))); -- 2.7.4