summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2015-08-19 16:12:29 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-08-19 16:12:29 +0200
commitc57cf86d6fa5df5029570c03ac6abe583f5e73f4 (patch)
tree02227801ca2ee36e7fc353d5a4dd55f281b715c0
parent7c83af2ae3c83d82b23e73115db1aad7f19bcecc (diff)
ector: fix naming and forcing this inline function to be static.
-rw-r--r--src/lib/ector/software/ector_drawhelper.c6
-rw-r--r--src/lib/ector/software/ector_drawhelper_private.h6
-rw-r--r--src/lib/ector/software/ector_drawhelper_sse2.c6
3 files changed, 8 insertions, 10 deletions
diff --git a/src/lib/ector/software/ector_drawhelper.c b/src/lib/ector/software/ector_drawhelper.c
index f1ea66b591..eee1d7c92d 100644
--- a/src/lib/ector/software/ector_drawhelper.c
+++ b/src/lib/ector/software/ector_drawhelper.c
@@ -26,7 +26,7 @@ comp_func_solid_source_over(uint *dest, int length, uint color, uint const_alpha
26 int ialpha, i; 26 int ialpha, i;
27 if (const_alpha != 255) 27 if (const_alpha != 255)
28 color = BYTE_MUL(color, const_alpha); 28 color = BYTE_MUL(color, const_alpha);
29 ialpha = Alpha(~color); 29 ialpha = _alpha(~color);
30 for (i = 0; i < length; ++i) 30 for (i = 0; i < length; ++i)
31 dest[i] = color + BYTE_MUL(dest[i], ialpha); 31 dest[i] = color + BYTE_MUL(dest[i], ialpha);
32} 32}
@@ -49,7 +49,7 @@ comp_func_source_over(uint *dest, const uint *src, int length, uint color, uint
49 dest[i] = s; 49 dest[i] = s;
50 else if (s != 0) 50 else if (s != 0)
51 { 51 {
52 sia = Alpha(~s); 52 sia = _alpha(~s);
53 dest[i] = s + BYTE_MUL(dest[i], sia); 53 dest[i] = s + BYTE_MUL(dest[i], sia);
54 } 54 }
55 } 55 }
@@ -60,7 +60,7 @@ comp_func_source_over(uint *dest, const uint *src, int length, uint color, uint
60 { 60 {
61 s = src[i]; 61 s = src[i];
62 sc = ECTOR_MUL4_SYM(color, s); 62 sc = ECTOR_MUL4_SYM(color, s);
63 sia = Alpha(~sc); 63 sia = _alpha(~sc);
64 dest[i] = sc + BYTE_MUL(dest[i], sia); 64 dest[i] = sc + BYTE_MUL(dest[i], sia);
65 } 65 }
66 } 66 }
diff --git a/src/lib/ector/software/ector_drawhelper_private.h b/src/lib/ector/software/ector_drawhelper_private.h
index ea7776001a..a753987fc9 100644
--- a/src/lib/ector/software/ector_drawhelper_private.h
+++ b/src/lib/ector/software/ector_drawhelper_private.h
@@ -17,13 +17,11 @@
17typedef unsigned int uint; 17typedef unsigned int uint;
18#endif 18#endif
19 19
20inline int Alpha(uint c) 20static inline int _alpha(uint c)
21{ 21{
22 return c>>24; 22 return c>>24;
23} 23}
24 24
25
26
27#define ECTOR_ARGB_JOIN(a,r,g,b) \ 25#define ECTOR_ARGB_JOIN(a,r,g,b) \
28 (((a) << 24) + ((r) << 16) + ((g) << 8) + (b)) 26 (((a) << 24) + ((r) << 16) + ((g) << 8) + (b))
29 27
@@ -99,4 +97,4 @@ void init_draw_helper();
99RGBA_Comp_Func_Solid ector_comp_func_solid_span_get(Ector_Rop op, uint color); 97RGBA_Comp_Func_Solid ector_comp_func_solid_span_get(Ector_Rop op, uint color);
100RGBA_Comp_Func ector_comp_func_span_get(Ector_Rop op, uint color, Eina_Bool src_alpha); 98RGBA_Comp_Func ector_comp_func_span_get(Ector_Rop op, uint color, Eina_Bool src_alpha);
101 99
102#endif \ No newline at end of file 100#endif
diff --git a/src/lib/ector/software/ector_drawhelper_sse2.c b/src/lib/ector/software/ector_drawhelper_sse2.c
index bf6b25cb27..581cbb7e21 100644
--- a/src/lib/ector/software/ector_drawhelper_sse2.c
+++ b/src/lib/ector/software/ector_drawhelper_sse2.c
@@ -157,7 +157,7 @@ comp_func_solid_source_over_sse2(uint *dest, int length, uint color, uint const_
157 int ialpha; 157 int ialpha;
158 if (const_alpha != 255) 158 if (const_alpha != 255)
159 color = BYTE_MUL(color, const_alpha); 159 color = BYTE_MUL(color, const_alpha);
160 ialpha = Alpha(~color); 160 ialpha = _alpha(~color);
161 comp_func_helper_sse2(dest, length, color, ialpha); 161 comp_func_helper_sse2(dest, length, color, ialpha);
162} 162}
163 163
@@ -272,7 +272,7 @@ comp_func_source_over_sse2(uint *dest, const uint *src, int length, uint color,
272 LOOP_ALIGNED_U1_A4(dest, length, 272 LOOP_ALIGNED_U1_A4(dest, length,
273 { /* UOP */ 273 { /* UOP */
274 s = *src; 274 s = *src;
275 sia = Alpha(~s); 275 sia = _alpha(~s);
276 *dest = s + BYTE_MUL(*dest, sia); 276 *dest = s + BYTE_MUL(*dest, sia);
277 dest++; src++; length--; 277 dest++; src++; length--;
278 }, 278 },
@@ -289,7 +289,7 @@ comp_func_source_over_sse2(uint *dest, const uint *src, int length, uint color,
289 LOOP_ALIGNED_U1_A4(dest, length, 289 LOOP_ALIGNED_U1_A4(dest, length,
290 { /* UOP */ 290 { /* UOP */
291 s = ECTOR_MUL4_SYM(*src, color); 291 s = ECTOR_MUL4_SYM(*src, color);
292 sia = Alpha(~s); 292 sia = _alpha(~s);
293 *dest = s + BYTE_MUL(*dest, sia); 293 *dest = s + BYTE_MUL(*dest, sia);
294 dest++; src++; length--; 294 dest++; src++; length--;
295 }, 295 },