sw_engine texmap: remove unnecessary conditions.
authorHermet Park <chuneon.park@samsung.com>
Fri, 26 Nov 2021 11:05:48 +0000 (20:05 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Tue, 30 Nov 2021 04:51:29 +0000 (13:51 +0900)
remove exceptional handling for the performance.

src/lib/sw_engine/tvgSwRasterTexmapInternal.h

index d7084bcbb085f09a3d654676481de9f0d5866a0b..c30186b30c79db274421313f3b3376f5b37125b1 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)));