summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2014-02-07 17:46:57 +0900
committerChunEon Park <hermet@hermet.pe.kr>2014-02-07 19:19:19 +0900
commit4f905edca35c7c3a43c9773c1679ecc1affe91c2 (patch)
tree0d0d84fb54327f373bcd90bf9761a59f8a661e58
parent407eaf029c92d0505b12eb461fd4a5c3311ab28f (diff)
evas/common - code cleanup
useless to consider this optimization on these days this just make people read code much awkward. And actually the code have been unused.
-rw-r--r--src/lib/evas/common/evas_map_image.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/lib/evas/common/evas_map_image.c b/src/lib/evas/common/evas_map_image.c
index 065b28fb47..bcd603bd75 100644
--- a/src/lib/evas/common/evas_map_image.c
+++ b/src/lib/evas/common/evas_map_image.c
@@ -94,15 +94,10 @@ _calc_spans(RGBA_Map_Point *p, Line *spans, int ystart, int yend, int cx, int cy
94 Eina_Bool interp_col = EINA_FALSE; 94 Eina_Bool interp_col = EINA_FALSE;
95 Eina_Bool swapped; 95 Eina_Bool swapped;
96 96
97#if 1 // maybe faster on x86? 97 for (i = 0; i < 4; i++) py[i] = (p[i].y >> FP);
98 for (i = 0; i < 4; i++) py[i] = p[i].y >> FP;
99# define PY(x) (py[x])
100#else
101# define PY(x) (p[x].y >> FP)
102#endif
103 98
104 //Horizontal Line? 99 //Horizontal Line?
105 if ((PY(0) == PY(1)) && (PY(0) == PY(2)) && (PY(0) == PY(3))) 100 if ((py[0] == py[1]) && (py[0] == py[2]) && (py[0] == py[3]))
106 { 101 {
107 int leftp, rightp; 102 int leftp, rightp;
108 103
@@ -117,7 +112,7 @@ _calc_spans(RGBA_Map_Point *p, Line *spans, int ystart, int yend, int cx, int cy
117 for (y = ystart; y <= yend; y++) 112 for (y = ystart; y <= yend; y++)
118 { 113 {
119 yp = y - ystart; 114 yp = y - ystart;
120 if (y == PY(0)) 115 if (y == py[0])
121 { 116 {
122 i = 0; 117 i = 0;
123 spans[yp].span[i].x1 = p[leftp].x >> FP; 118 spans[yp].span[i].x1 = p[leftp].x >> FP;
@@ -156,13 +151,13 @@ _calc_spans(RGBA_Map_Point *p, Line *spans, int ystart, int yend, int cx, int cy
156 //Find edges that intersects with current scanline. 151 //Find edges that intersects with current scanline.
157 for (i = 0; i < 4; i++) 152 for (i = 0; i < 4; i++)
158 { 153 {
159 if ((PY(i) <= y) && (PY((i + 1) % 4) > y)) 154 if ((py[i] <= y) && (py[(i + 1) % 4] > y))
160 { 155 {
161 edge[edge_num][0] = i; 156 edge[edge_num][0] = i;
162 edge[edge_num][1] = (i + 1) % 4; 157 edge[edge_num][1] = (i + 1) % 4;
163 edge_num++; 158 edge_num++;
164 } 159 }
165 else if ((PY((i + 1) % 4) <= y) && (PY(i) > y)) 160 else if ((py[(i + 1) % 4] <= y) && (py[i] > y))
166 { 161 {
167 edge[edge_num][0] = (i + 1) % 4; 162 edge[edge_num][0] = (i + 1) % 4;
168 edge[edge_num][1] = i; 163 edge[edge_num][1] = i;