diff options
author | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
commit | dd7595a3475407a7fa96a97393bae8c5220e8762 (patch) | |
tree | e341e911d7eb911a51684a7412ef7f7c7605d28e /libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_.c | |
parent | Add the skeleton. (diff) | |
download | SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.zip SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.gz SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.bz2 SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.xz |
Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje.
Note that embryo wont be used, but I'm not sure yet if you can build edje without it.
Diffstat (limited to '')
-rw-r--r-- | libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_.c | 150 |
1 files changed, 150 insertions, 0 deletions
diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_.c new file mode 100644 index 0000000..48b5338 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_.c | |||
@@ -0,0 +1,150 @@ | |||
1 | /* copy pixel x mask --> dst */ | ||
2 | |||
3 | #ifdef BUILD_C | ||
4 | static void | ||
5 | _op_copy_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { | ||
6 | DATA32 *e; | ||
7 | int color; | ||
8 | UNROLL8_PLD_WHILE(d, l, e, | ||
9 | { | ||
10 | color = *m; | ||
11 | switch(color) | ||
12 | { | ||
13 | case 0: | ||
14 | break; | ||
15 | case 255: | ||
16 | *d = *s; | ||
17 | break; | ||
18 | default: | ||
19 | color++; | ||
20 | *d = INTERP_256(color, *s, *d); | ||
21 | break; | ||
22 | } | ||
23 | m++; s++; d++; | ||
24 | }); | ||
25 | } | ||
26 | |||
27 | |||
28 | #define _op_copy_pan_mas_dp _op_copy_p_mas_dp | ||
29 | #define _op_copy_pas_mas_dp _op_copy_p_mas_dp | ||
30 | |||
31 | #define _op_copy_p_mas_dpan _op_copy_p_mas_dp | ||
32 | #define _op_copy_pan_mas_dpan _op_copy_p_mas_dpan | ||
33 | #define _op_copy_pas_mas_dpan _op_copy_p_mas_dpan | ||
34 | |||
35 | static void | ||
36 | init_copy_pixel_mask_span_funcs_c(void) | ||
37 | { | ||
38 | op_copy_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_copy_p_mas_dp; | ||
39 | op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_copy_pan_mas_dp; | ||
40 | op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_copy_pas_mas_dp; | ||
41 | |||
42 | op_copy_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_p_mas_dpan; | ||
43 | op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pan_mas_dpan; | ||
44 | op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pas_mas_dpan; | ||
45 | } | ||
46 | #endif | ||
47 | |||
48 | #ifdef BUILD_C | ||
49 | static void | ||
50 | _op_copy_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c __UNUSED__, DATA32 *d) { | ||
51 | *d = INTERP_256(m + 1, s, *d); | ||
52 | } | ||
53 | |||
54 | #define _op_copy_pt_pan_mas_dp _op_copy_pt_p_mas_dp | ||
55 | #define _op_copy_pt_pas_mas_dp _op_copy_pt_p_mas_dp | ||
56 | |||
57 | #define _op_copy_pt_p_mas_dpan _op_copy_pt_p_mas_dp | ||
58 | #define _op_copy_pt_pan_mas_dpan _op_copy_pt_p_mas_dpan | ||
59 | #define _op_copy_pt_pas_mas_dpan _op_copy_pt_p_mas_dpan | ||
60 | |||
61 | static void | ||
62 | init_copy_pixel_mask_pt_funcs_c(void) | ||
63 | { | ||
64 | op_copy_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_copy_pt_p_mas_dp; | ||
65 | op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_copy_pt_pan_mas_dp; | ||
66 | op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_copy_pt_pas_mas_dp; | ||
67 | |||
68 | op_copy_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pt_p_mas_dpan; | ||
69 | op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pt_pan_mas_dpan; | ||
70 | op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pt_pas_mas_dpan; | ||
71 | } | ||
72 | #endif | ||
73 | |||
74 | /*-----*/ | ||
75 | |||
76 | /* copy_rel pixel x mask --> dst */ | ||
77 | |||
78 | #ifdef BUILD_C | ||
79 | static void | ||
80 | _op_copy_rel_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { | ||
81 | DATA32 *e; | ||
82 | int color; | ||
83 | UNROLL8_PLD_WHILE(d, l, e, | ||
84 | { | ||
85 | color = *m; | ||
86 | switch(color) | ||
87 | { | ||
88 | case 0: | ||
89 | break; | ||
90 | case 255: | ||
91 | *d = MUL_SYM(*d >> 24, *s); | ||
92 | break; | ||
93 | default: | ||
94 | c = MUL_SYM(*d >> 24, *s); | ||
95 | l++; | ||
96 | *d = INTERP_256(l, c, *d); | ||
97 | break; | ||
98 | } | ||
99 | m++; s++; d++; | ||
100 | }); | ||
101 | } | ||
102 | |||
103 | |||
104 | #define _op_copy_rel_pan_mas_dp _op_copy_rel_p_mas_dp | ||
105 | #define _op_copy_rel_pas_mas_dp _op_copy_rel_p_mas_dp | ||
106 | |||
107 | #define _op_copy_rel_p_mas_dpan _op_copy_p_mas_dpan | ||
108 | #define _op_copy_rel_pan_mas_dpan _op_copy_pan_mas_dpan | ||
109 | #define _op_copy_rel_pas_mas_dpan _op_copy_pas_mas_dpan | ||
110 | |||
111 | static void | ||
112 | init_copy_rel_pixel_mask_span_funcs_c(void) | ||
113 | { | ||
114 | op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_p_mas_dp; | ||
115 | op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pan_mas_dp; | ||
116 | op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pas_mas_dp; | ||
117 | |||
118 | op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_p_mas_dpan; | ||
119 | op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pan_mas_dpan; | ||
120 | op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pas_mas_dpan; | ||
121 | } | ||
122 | #endif | ||
123 | |||
124 | #ifdef BUILD_C | ||
125 | static void | ||
126 | _op_copy_rel_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { | ||
127 | c = MUL_SYM(*d >> 24, s); | ||
128 | *d = INTERP_256(m + 1, c, *d); | ||
129 | } | ||
130 | |||
131 | |||
132 | #define _op_copy_rel_pt_pan_mas_dp _op_copy_rel_pt_p_mas_dp | ||
133 | #define _op_copy_rel_pt_pas_mas_dp _op_copy_rel_pt_p_mas_dp | ||
134 | |||
135 | #define _op_copy_rel_pt_p_mas_dpan _op_copy_pt_p_mas_dpan | ||
136 | #define _op_copy_rel_pt_pan_mas_dpan _op_copy_pt_pan_mas_dpan | ||
137 | #define _op_copy_rel_pt_pas_mas_dpan _op_copy_pt_pas_mas_dpan | ||
138 | |||
139 | static void | ||
140 | init_copy_rel_pixel_mask_pt_funcs_c(void) | ||
141 | { | ||
142 | op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pt_p_mas_dp; | ||
143 | op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pt_pan_mas_dp; | ||
144 | op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pt_pas_mas_dp; | ||
145 | |||
146 | op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_p_mas_dpan; | ||
147 | op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_pan_mas_dpan; | ||
148 | op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_pas_mas_dpan; | ||
149 | } | ||
150 | #endif | ||