diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/evas/src/lib/engines/common/evas_op_mask_main_.c | 309 |
1 files changed, 0 insertions, 309 deletions
diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask_main_.c b/libraries/evas/src/lib/engines/common/evas_op_mask_main_.c deleted file mode 100644 index bbe497a..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_mask_main_.c +++ /dev/null | |||
@@ -1,309 +0,0 @@ | |||
1 | #include "evas_common.h" | ||
2 | |||
3 | static RGBA_Gfx_Func op_mask_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; | ||
4 | static RGBA_Gfx_Pt_Func op_mask_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; | ||
5 | |||
6 | static void op_mask_init(void); | ||
7 | static void op_mask_shutdown(void); | ||
8 | |||
9 | static RGBA_Gfx_Func op_mask_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); | ||
10 | static RGBA_Gfx_Func op_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); | ||
11 | static RGBA_Gfx_Func op_mask_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); | ||
12 | static RGBA_Gfx_Func op_mask_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); | ||
13 | static RGBA_Gfx_Func op_mask_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); | ||
14 | |||
15 | static RGBA_Gfx_Pt_Func op_mask_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); | ||
16 | static RGBA_Gfx_Pt_Func op_mask_color_pt_get(DATA32 col, RGBA_Image *dst); | ||
17 | static RGBA_Gfx_Pt_Func op_mask_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); | ||
18 | static RGBA_Gfx_Pt_Func op_mask_mask_color_pt_get(DATA32 col, RGBA_Image *dst); | ||
19 | static RGBA_Gfx_Pt_Func op_mask_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); | ||
20 | |||
21 | static RGBA_Gfx_Compositor _composite_mask = { "mask", | ||
22 | op_mask_init, op_mask_shutdown, | ||
23 | op_mask_pixel_span_get, op_mask_color_span_get, | ||
24 | op_mask_pixel_color_span_get, op_mask_mask_color_span_get, | ||
25 | op_mask_pixel_mask_span_get, | ||
26 | op_mask_pixel_pt_get, op_mask_color_pt_get, | ||
27 | op_mask_pixel_color_pt_get, op_mask_mask_color_pt_get, | ||
28 | op_mask_pixel_mask_pt_get | ||
29 | }; | ||
30 | |||
31 | RGBA_Gfx_Compositor * | ||
32 | evas_common_gfx_compositor_mask_get(void) | ||
33 | { | ||
34 | return &(_composite_mask); | ||
35 | } | ||
36 | |||
37 | |||
38 | # include "./evas_op_mask/op_mask_pixel_.c" | ||
39 | # include "./evas_op_mask/op_mask_color_.c" | ||
40 | # include "./evas_op_mask/op_mask_pixel_color_.c" | ||
41 | # include "./evas_op_mask/op_mask_pixel_mask_.c" | ||
42 | # include "./evas_op_mask/op_mask_mask_color_.c" | ||
43 | //# include "./evas_op_mask/op_mask_pixel_mask_color_.c" | ||
44 | |||
45 | # include "./evas_op_mask/op_mask_pixel_i386.c" | ||
46 | # include "./evas_op_mask/op_mask_color_i386.c" | ||
47 | # include "./evas_op_mask/op_mask_pixel_color_i386.c" | ||
48 | # include "./evas_op_mask/op_mask_pixel_mask_i386.c" | ||
49 | # include "./evas_op_mask/op_mask_mask_color_i386.c" | ||
50 | //# include "./evas_op_mask/op_mask_pixel_mask_color_i386.c" | ||
51 | |||
52 | |||
53 | static void | ||
54 | op_mask_init(void) | ||
55 | { | ||
56 | memset(op_mask_span_funcs, 0, sizeof(op_mask_span_funcs)); | ||
57 | memset(op_mask_pt_funcs, 0, sizeof(op_mask_pt_funcs)); | ||
58 | #ifdef BUILD_MMX | ||
59 | init_mask_pixel_span_funcs_mmx(); | ||
60 | init_mask_pixel_color_span_funcs_mmx(); | ||
61 | init_mask_pixel_mask_span_funcs_mmx(); | ||
62 | init_mask_color_span_funcs_mmx(); | ||
63 | init_mask_mask_color_span_funcs_mmx(); | ||
64 | |||
65 | init_mask_pixel_pt_funcs_mmx(); | ||
66 | init_mask_pixel_color_pt_funcs_mmx(); | ||
67 | init_mask_pixel_mask_pt_funcs_mmx(); | ||
68 | init_mask_color_pt_funcs_mmx(); | ||
69 | init_mask_mask_color_pt_funcs_mmx(); | ||
70 | #endif | ||
71 | #ifdef BUILD_C | ||
72 | init_mask_pixel_span_funcs_c(); | ||
73 | init_mask_pixel_color_span_funcs_c(); | ||
74 | init_mask_pixel_mask_span_funcs_c(); | ||
75 | init_mask_color_span_funcs_c(); | ||
76 | init_mask_mask_color_span_funcs_c(); | ||
77 | |||
78 | init_mask_pixel_pt_funcs_c(); | ||
79 | init_mask_pixel_color_pt_funcs_c(); | ||
80 | init_mask_pixel_mask_pt_funcs_c(); | ||
81 | init_mask_color_pt_funcs_c(); | ||
82 | init_mask_mask_color_pt_funcs_c(); | ||
83 | #endif | ||
84 | } | ||
85 | |||
86 | static void | ||
87 | op_mask_shutdown(void) | ||
88 | { | ||
89 | } | ||
90 | |||
91 | static RGBA_Gfx_Func | ||
92 | mask_gfx_span_func_cpu(int s, int m, int c, int d) | ||
93 | { | ||
94 | RGBA_Gfx_Func func = NULL; | ||
95 | int cpu = CPU_N; | ||
96 | #ifdef BUILD_MMX | ||
97 | if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) | ||
98 | { | ||
99 | cpu = CPU_MMX; | ||
100 | func = op_mask_span_funcs[s][m][c][d][cpu]; | ||
101 | if (func) return func; | ||
102 | } | ||
103 | #endif | ||
104 | #ifdef BUILD_C | ||
105 | cpu = CPU_C; | ||
106 | func = op_mask_span_funcs[s][m][c][d][cpu]; | ||
107 | if (func) return func; | ||
108 | #endif | ||
109 | return func; | ||
110 | } | ||
111 | |||
112 | static RGBA_Gfx_Func | ||
113 | op_mask_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) | ||
114 | { | ||
115 | int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; | ||
116 | |||
117 | if (src && src->cache_entry.flags.alpha) | ||
118 | { | ||
119 | dst->cache_entry.flags.alpha = 1; | ||
120 | s = SP; | ||
121 | } | ||
122 | if (dst && dst->cache_entry.flags.alpha) | ||
123 | d = DP; | ||
124 | return mask_gfx_span_func_cpu(s, m, c, d); | ||
125 | } | ||
126 | |||
127 | static RGBA_Gfx_Func | ||
128 | op_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) | ||
129 | { | ||
130 | int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; | ||
131 | |||
132 | if ((col >> 24) < 255) | ||
133 | { | ||
134 | if (dst) | ||
135 | dst->cache_entry.flags.alpha = 1; | ||
136 | c = SC; | ||
137 | } | ||
138 | if (col == (col | 0x00ffffff)) | ||
139 | c = SC_AA; | ||
140 | if (col == 0xffffffff) | ||
141 | c = SC_N; | ||
142 | if (dst && dst->cache_entry.flags.alpha) | ||
143 | d = DP; | ||
144 | return mask_gfx_span_func_cpu(s, m, c, d); | ||
145 | } | ||
146 | |||
147 | static RGBA_Gfx_Func | ||
148 | op_mask_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) | ||
149 | { | ||
150 | int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; | ||
151 | |||
152 | if (src && src->cache_entry.flags.alpha) | ||
153 | { | ||
154 | if (dst) | ||
155 | dst->cache_entry.flags.alpha = 1; | ||
156 | s = SP; | ||
157 | } | ||
158 | if ((col >> 24) < 255) | ||
159 | { | ||
160 | if (dst) | ||
161 | dst->cache_entry.flags.alpha = 1; | ||
162 | c = SC; | ||
163 | } | ||
164 | if (col == (col | 0x00ffffff)) | ||
165 | c = SC_AA; | ||
166 | if (col == 0xffffffff) | ||
167 | c = SC_N; | ||
168 | if (dst && dst->cache_entry.flags.alpha) | ||
169 | d = DP; | ||
170 | return mask_gfx_span_func_cpu(s, m, c, d); | ||
171 | } | ||
172 | |||
173 | static RGBA_Gfx_Func | ||
174 | op_mask_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) | ||
175 | { | ||
176 | int s = SP_N, m = SM_AS, c = SC_AN, d = DP; | ||
177 | |||
178 | if (dst) | ||
179 | dst->cache_entry.flags.alpha = 1; | ||
180 | if ((col >> 24) < 255) | ||
181 | c = SC; | ||
182 | if (col == (col | 0x00ffffff)) | ||
183 | c = SC_AA; | ||
184 | if (col == 0xffffffff) | ||
185 | c = SC_N; | ||
186 | return mask_gfx_span_func_cpu(s, m, c, d); | ||
187 | } | ||
188 | |||
189 | static RGBA_Gfx_Func | ||
190 | op_mask_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) | ||
191 | { | ||
192 | int s = SP_AN, m = SM_AS, c = SC_N, d = DP; | ||
193 | |||
194 | if (dst) | ||
195 | dst->cache_entry.flags.alpha = 1; | ||
196 | if (src && src->cache_entry.flags.alpha) | ||
197 | s = SP; | ||
198 | return mask_gfx_span_func_cpu(s, m, c, d); | ||
199 | } | ||
200 | |||
201 | static RGBA_Gfx_Pt_Func | ||
202 | mask_gfx_pt_func_cpu(int s, int m, int c, int d) | ||
203 | { | ||
204 | RGBA_Gfx_Pt_Func func = NULL; | ||
205 | int cpu = CPU_N; | ||
206 | #ifdef BUILD_MMX | ||
207 | if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) | ||
208 | { | ||
209 | cpu = CPU_MMX; | ||
210 | func = op_mask_pt_funcs[s][m][c][d][cpu]; | ||
211 | if (func) return func; | ||
212 | } | ||
213 | #endif | ||
214 | #ifdef BUILD_C | ||
215 | cpu = CPU_C; | ||
216 | func = op_mask_pt_funcs[s][m][c][d][cpu]; | ||
217 | if (func) return func; | ||
218 | #endif | ||
219 | return func; | ||
220 | } | ||
221 | |||
222 | static RGBA_Gfx_Pt_Func | ||
223 | op_mask_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) | ||
224 | { | ||
225 | int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; | ||
226 | |||
227 | if (src_flags.alpha) | ||
228 | { | ||
229 | dst->cache_entry.flags.alpha = 1; | ||
230 | s = SP; | ||
231 | } | ||
232 | if (dst && dst->cache_entry.flags.alpha) | ||
233 | d = DP; | ||
234 | return mask_gfx_pt_func_cpu(s, m, c, d); | ||
235 | } | ||
236 | |||
237 | static RGBA_Gfx_Pt_Func | ||
238 | op_mask_color_pt_get(DATA32 col, RGBA_Image *dst) | ||
239 | { | ||
240 | int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; | ||
241 | |||
242 | if ((col >> 24) < 255) | ||
243 | { | ||
244 | if (dst) | ||
245 | dst->cache_entry.flags.alpha = 1; | ||
246 | c = SC; | ||
247 | } | ||
248 | if (col == (col | 0x00ffffff)) | ||
249 | c = SC_AA; | ||
250 | if (col == 0xffffffff) | ||
251 | c = SC_N; | ||
252 | if (dst && dst->cache_entry.flags.alpha) | ||
253 | d = DP; | ||
254 | return mask_gfx_pt_func_cpu(s, m, c, d); | ||
255 | } | ||
256 | |||
257 | static RGBA_Gfx_Pt_Func | ||
258 | op_mask_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) | ||
259 | { | ||
260 | int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; | ||
261 | |||
262 | if (src_flags.alpha) | ||
263 | { | ||
264 | if (dst) | ||
265 | dst->cache_entry.flags.alpha = 1; | ||
266 | s = SP; | ||
267 | } | ||
268 | if ((col >> 24) < 255) | ||
269 | { | ||
270 | if (dst) | ||
271 | dst->cache_entry.flags.alpha = 1; | ||
272 | c = SC; | ||
273 | } | ||
274 | if (col == (col | 0x00ffffff)) | ||
275 | c = SC_AA; | ||
276 | if (col == 0xffffffff) | ||
277 | c = SC_N; | ||
278 | if (dst && dst->cache_entry.flags.alpha) | ||
279 | d = DP; | ||
280 | return mask_gfx_pt_func_cpu(s, m, c, d); | ||
281 | } | ||
282 | |||
283 | static RGBA_Gfx_Pt_Func | ||
284 | op_mask_mask_color_pt_get(DATA32 col, RGBA_Image *dst) | ||
285 | { | ||
286 | int s = SP_N, m = SM_AS, c = SC_AN, d = DP; | ||
287 | |||
288 | if (dst) | ||
289 | dst->cache_entry.flags.alpha = 1; | ||
290 | if ((col >> 24) < 255) | ||
291 | c = SC; | ||
292 | if (col == (col | 0x00ffffff)) | ||
293 | c = SC_AA; | ||
294 | if (col == 0xffffffff) | ||
295 | c = SC_N; | ||
296 | return mask_gfx_pt_func_cpu(s, m, c, d); | ||
297 | } | ||
298 | |||
299 | static RGBA_Gfx_Pt_Func | ||
300 | op_mask_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) | ||
301 | { | ||
302 | int s = SP_AN, m = SM_AS, c = SC_N, d = DP; | ||
303 | |||
304 | if (dst) | ||
305 | dst->cache_entry.flags.alpha = 1; | ||
306 | if (src_flags.alpha) | ||
307 | s = SP; | ||
308 | return mask_gfx_pt_func_cpu(s, m, c, d); | ||
309 | } | ||