sw_engine texmap: remove unnecessary conditions.
authorHermet Park <chuneon.park@samsung.com>
Fri, 26 Nov 2021 11:05:48 +0000 (20:05 +0900)
committerHermet Park <chuneon.park@samsung.com>
Tue, 30 Nov 2021 03:48:22 +0000 (12:48 +0900)
remove exceptional handling for the performance.

src/lib/sw_engine/tvgSwRasterTexmapInternal.h

index d7084bc..c30186b 100644 (file)
         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)));