diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/evas/src/lib/engines/common/evas_op_copy_main_.c | 675 |
1 files changed, 0 insertions, 675 deletions
diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy_main_.c b/libraries/evas/src/lib/engines/common/evas_op_copy_main_.c deleted file mode 100644 index 4575aee..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_copy_main_.c +++ /dev/null | |||
@@ -1,675 +0,0 @@ | |||
1 | #include "evas_common.h" | ||
2 | #include "evas_blend_private.h" | ||
3 | |||
4 | static RGBA_Gfx_Func op_copy_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; | ||
5 | static RGBA_Gfx_Pt_Func op_copy_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; | ||
6 | |||
7 | static void op_copy_init(void); | ||
8 | static void op_copy_shutdown(void); | ||
9 | |||
10 | static RGBA_Gfx_Func op_copy_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); | ||
11 | static RGBA_Gfx_Func op_copy_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); | ||
12 | static RGBA_Gfx_Func op_copy_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); | ||
13 | static RGBA_Gfx_Func op_copy_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); | ||
14 | static RGBA_Gfx_Func op_copy_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); | ||
15 | |||
16 | static RGBA_Gfx_Pt_Func op_copy_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); | ||
17 | static RGBA_Gfx_Pt_Func op_copy_color_pt_get(DATA32 col, RGBA_Image *dst); | ||
18 | static RGBA_Gfx_Pt_Func op_copy_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); | ||
19 | static RGBA_Gfx_Pt_Func op_copy_mask_color_pt_get(DATA32 col, RGBA_Image *dst); | ||
20 | static RGBA_Gfx_Pt_Func op_copy_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); | ||
21 | |||
22 | static RGBA_Gfx_Compositor _composite_copy = { "copy", | ||
23 | op_copy_init, op_copy_shutdown, | ||
24 | op_copy_pixel_span_get, op_copy_color_span_get, | ||
25 | op_copy_pixel_color_span_get, op_copy_mask_color_span_get, | ||
26 | op_copy_pixel_mask_span_get, | ||
27 | op_copy_pixel_pt_get, op_copy_color_pt_get, | ||
28 | op_copy_pixel_color_pt_get, op_copy_mask_color_pt_get, | ||
29 | op_copy_pixel_mask_pt_get | ||
30 | }; | ||
31 | |||
32 | RGBA_Gfx_Compositor * | ||
33 | evas_common_gfx_compositor_copy_get(void) | ||
34 | { | ||
35 | return &(_composite_copy); | ||
36 | } | ||
37 | |||
38 | |||
39 | static RGBA_Gfx_Func op_copy_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; | ||
40 | static RGBA_Gfx_Pt_Func op_copy_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; | ||
41 | |||
42 | static void op_copy_rel_init(void); | ||
43 | static void op_copy_rel_shutdown(void); | ||
44 | |||
45 | static RGBA_Gfx_Func op_copy_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); | ||
46 | static RGBA_Gfx_Func op_copy_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); | ||
47 | static RGBA_Gfx_Func op_copy_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); | ||
48 | static RGBA_Gfx_Func op_copy_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); | ||
49 | static RGBA_Gfx_Func op_copy_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); | ||
50 | |||
51 | static RGBA_Gfx_Pt_Func op_copy_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); | ||
52 | /* XXX: doesn't exist | ||
53 | static RGBA_Gfx_Pt_Func op_copy_rel_color_pt_get(DATA32 col, RGBA_Image *dst); | ||
54 | */ | ||
55 | static RGBA_Gfx_Pt_Func op_copy_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); | ||
56 | static RGBA_Gfx_Pt_Func op_copy_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst); | ||
57 | static RGBA_Gfx_Pt_Func op_copy_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); | ||
58 | |||
59 | static RGBA_Gfx_Compositor _composite_copy_rel = { "copy_rel", | ||
60 | op_copy_rel_init, op_copy_rel_shutdown, | ||
61 | op_copy_rel_pixel_span_get, op_copy_rel_color_span_get, | ||
62 | op_copy_rel_pixel_color_span_get, op_copy_rel_mask_color_span_get, | ||
63 | op_copy_rel_pixel_mask_span_get, | ||
64 | op_copy_rel_pixel_pt_get, op_copy_color_pt_get, | ||
65 | op_copy_rel_pixel_color_pt_get, op_copy_rel_mask_color_pt_get, | ||
66 | op_copy_rel_pixel_mask_pt_get | ||
67 | }; | ||
68 | |||
69 | RGBA_Gfx_Compositor * | ||
70 | evas_common_gfx_compositor_copy_rel_get(void) | ||
71 | { | ||
72 | return &(_composite_copy_rel); | ||
73 | } | ||
74 | |||
75 | |||
76 | # include "./evas_op_copy/op_copy_pixel_.c" | ||
77 | # include "./evas_op_copy/op_copy_color_.c" | ||
78 | # include "./evas_op_copy/op_copy_pixel_color_.c" | ||
79 | # include "./evas_op_copy/op_copy_pixel_mask_.c" | ||
80 | # include "./evas_op_copy/op_copy_mask_color_.c" | ||
81 | //# include "./evas_op_copy/op_copy_pixel_mask_color_.c" | ||
82 | |||
83 | # include "./evas_op_copy/op_copy_pixel_i386.c" | ||
84 | # include "./evas_op_copy/op_copy_color_i386.c" | ||
85 | # include "./evas_op_copy/op_copy_pixel_color_i386.c" | ||
86 | # include "./evas_op_copy/op_copy_pixel_mask_i386.c" | ||
87 | # include "./evas_op_copy/op_copy_mask_color_i386.c" | ||
88 | //# include "./evas_op_copy/op_copy_pixel_mask_color_i386.c" | ||
89 | |||
90 | # include "./evas_op_copy/op_copy_pixel_neon.c" | ||
91 | # include "./evas_op_copy/op_copy_color_neon.c" | ||
92 | # include "./evas_op_copy/op_copy_pixel_color_neon.c" | ||
93 | # include "./evas_op_copy/op_copy_pixel_mask_neon.c" | ||
94 | # include "./evas_op_copy/op_copy_mask_color_neon.c" | ||
95 | //# include "./evas_op_copy/op_copy_pixel_mask_color_neon.c" | ||
96 | |||
97 | |||
98 | static void | ||
99 | op_copy_init(void) | ||
100 | { | ||
101 | memset(op_copy_span_funcs, 0, sizeof(op_copy_span_funcs)); | ||
102 | memset(op_copy_pt_funcs, 0, sizeof(op_copy_pt_funcs)); | ||
103 | #ifdef BUILD_MMX | ||
104 | init_copy_pixel_span_funcs_mmx(); | ||
105 | init_copy_pixel_color_span_funcs_mmx(); | ||
106 | init_copy_pixel_mask_span_funcs_mmx(); | ||
107 | init_copy_color_span_funcs_mmx(); | ||
108 | init_copy_mask_color_span_funcs_mmx(); | ||
109 | |||
110 | init_copy_pixel_pt_funcs_mmx(); | ||
111 | init_copy_pixel_color_pt_funcs_mmx(); | ||
112 | init_copy_pixel_mask_pt_funcs_mmx(); | ||
113 | init_copy_color_pt_funcs_mmx(); | ||
114 | init_copy_mask_color_pt_funcs_mmx(); | ||
115 | #endif | ||
116 | #ifdef BUILD_NEON | ||
117 | init_copy_pixel_span_funcs_neon(); | ||
118 | init_copy_pixel_color_span_funcs_neon(); | ||
119 | init_copy_pixel_mask_span_funcs_neon(); | ||
120 | init_copy_color_span_funcs_neon(); | ||
121 | init_copy_mask_color_span_funcs_neon(); | ||
122 | |||
123 | init_copy_pixel_pt_funcs_neon(); | ||
124 | init_copy_pixel_color_pt_funcs_neon(); | ||
125 | init_copy_pixel_mask_pt_funcs_neon(); | ||
126 | init_copy_color_pt_funcs_neon(); | ||
127 | init_copy_mask_color_pt_funcs_neon(); | ||
128 | #endif | ||
129 | #ifdef BUILD_C | ||
130 | init_copy_pixel_span_funcs_c(); | ||
131 | init_copy_pixel_color_span_funcs_c(); | ||
132 | init_copy_pixel_mask_span_funcs_c(); | ||
133 | init_copy_color_span_funcs_c(); | ||
134 | init_copy_mask_color_span_funcs_c(); | ||
135 | |||
136 | init_copy_pixel_pt_funcs_c(); | ||
137 | init_copy_pixel_color_pt_funcs_c(); | ||
138 | init_copy_pixel_mask_pt_funcs_c(); | ||
139 | init_copy_color_pt_funcs_c(); | ||
140 | init_copy_mask_color_pt_funcs_c(); | ||
141 | #endif | ||
142 | } | ||
143 | |||
144 | static void | ||
145 | op_copy_shutdown(void) | ||
146 | { | ||
147 | } | ||
148 | |||
149 | static RGBA_Gfx_Func | ||
150 | copy_gfx_span_func_cpu(int s, int m, int c, int d) | ||
151 | { | ||
152 | RGBA_Gfx_Func func = NULL; | ||
153 | int cpu = CPU_N; | ||
154 | #ifdef BUILD_MMX | ||
155 | if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) | ||
156 | { | ||
157 | cpu = CPU_MMX; | ||
158 | func = op_copy_span_funcs[s][m][c][d][cpu]; | ||
159 | if (func) return func; | ||
160 | } | ||
161 | #endif | ||
162 | #ifdef BUILD_NEON | ||
163 | if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) | ||
164 | { | ||
165 | cpu = CPU_NEON; | ||
166 | func = op_copy_span_funcs[s][m][c][d][cpu]; | ||
167 | if (func) return func; | ||
168 | } | ||
169 | #endif | ||
170 | #ifdef BUILD_C | ||
171 | cpu = CPU_C; | ||
172 | func = op_copy_span_funcs[s][m][c][d][cpu]; | ||
173 | if (func) return func; | ||
174 | #endif | ||
175 | return func; | ||
176 | } | ||
177 | |||
178 | static RGBA_Gfx_Func | ||
179 | op_copy_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) | ||
180 | { | ||
181 | int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; | ||
182 | |||
183 | if (src && src->cache_entry.flags.alpha) | ||
184 | { | ||
185 | dst->cache_entry.flags.alpha = 1; | ||
186 | s = SP; | ||
187 | } | ||
188 | if (dst && dst->cache_entry.flags.alpha) | ||
189 | d = DP; | ||
190 | return copy_gfx_span_func_cpu(s, m, c, d); | ||
191 | } | ||
192 | |||
193 | static RGBA_Gfx_Func | ||
194 | op_copy_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) | ||
195 | { | ||
196 | int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; | ||
197 | |||
198 | if ((col >> 24) < 255) | ||
199 | { | ||
200 | if (dst) | ||
201 | dst->cache_entry.flags.alpha = 1; | ||
202 | c = SC; | ||
203 | } | ||
204 | if (col == ((col >> 24) * 0x01010101)) | ||
205 | c = SC_AA; | ||
206 | if (col == 0xffffffff) | ||
207 | c = SC_N; | ||
208 | if (dst && dst->cache_entry.flags.alpha) | ||
209 | d = DP; | ||
210 | return copy_gfx_span_func_cpu(s, m, c, d); | ||
211 | } | ||
212 | |||
213 | static RGBA_Gfx_Func | ||
214 | op_copy_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) | ||
215 | { | ||
216 | int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; | ||
217 | |||
218 | if (src && src->cache_entry.flags.alpha) | ||
219 | { | ||
220 | if (dst) | ||
221 | dst->cache_entry.flags.alpha = 1; | ||
222 | s = SP; | ||
223 | } | ||
224 | if ((col >> 24) < 255) | ||
225 | { | ||
226 | if (dst) | ||
227 | dst->cache_entry.flags.alpha = 1; | ||
228 | c = SC; | ||
229 | } | ||
230 | if (col == ((col >> 24) * 0x01010101)) | ||
231 | c = SC_AA; | ||
232 | if (col == 0xffffffff) | ||
233 | c = SC_N; | ||
234 | if (dst && dst->cache_entry.flags.alpha) | ||
235 | d = DP; | ||
236 | return copy_gfx_span_func_cpu(s, m, c, d); | ||
237 | } | ||
238 | |||
239 | static RGBA_Gfx_Func | ||
240 | op_copy_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) | ||
241 | { | ||
242 | int s = SP_N, m = SM_AS, c = SC_AN, d = DP; | ||
243 | |||
244 | if (dst) | ||
245 | dst->cache_entry.flags.alpha = 1; | ||
246 | if ((col >> 24) < 255) | ||
247 | c = SC; | ||
248 | if (col == ((col >> 24) * 0x01010101)) | ||
249 | c = SC_AA; | ||
250 | if (col == 0xffffffff) | ||
251 | c = SC_N; | ||
252 | return copy_gfx_span_func_cpu(s, m, c, d); | ||
253 | } | ||
254 | |||
255 | static RGBA_Gfx_Func | ||
256 | op_copy_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) | ||
257 | { | ||
258 | int s = SP_AN, m = SM_AS, c = SC_N, d = DP; | ||
259 | |||
260 | if (dst) | ||
261 | dst->cache_entry.flags.alpha = 1; | ||
262 | if (src && src->cache_entry.flags.alpha) | ||
263 | s = SP; | ||
264 | return copy_gfx_span_func_cpu(s, m, c, d); | ||
265 | } | ||
266 | |||
267 | static RGBA_Gfx_Pt_Func | ||
268 | copy_gfx_pt_func_cpu(int s, int m, int c, int d) | ||
269 | { | ||
270 | RGBA_Gfx_Pt_Func func = NULL; | ||
271 | int cpu = CPU_N; | ||
272 | #ifdef BUILD_MMX | ||
273 | if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) | ||
274 | { | ||
275 | cpu = CPU_MMX; | ||
276 | func = op_copy_pt_funcs[s][m][c][d][cpu]; | ||
277 | if (func) return func; | ||
278 | } | ||
279 | #endif | ||
280 | #ifdef BUILD_NEON | ||
281 | if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) | ||
282 | { | ||
283 | cpu = CPU_NEON; | ||
284 | func = op_copy_pt_funcs[s][m][c][d][cpu]; | ||
285 | if (func) return func; | ||
286 | } | ||
287 | #endif | ||
288 | #ifdef BUILD_C | ||
289 | cpu = CPU_C; | ||
290 | func = op_copy_pt_funcs[s][m][c][d][cpu]; | ||
291 | if (func) return func; | ||
292 | #endif | ||
293 | return func; | ||
294 | } | ||
295 | |||
296 | static RGBA_Gfx_Pt_Func | ||
297 | op_copy_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) | ||
298 | { | ||
299 | int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; | ||
300 | |||
301 | if (src_flags.alpha) | ||
302 | { | ||
303 | dst->cache_entry.flags.alpha = 1; | ||
304 | s = SP; | ||
305 | } | ||
306 | if (dst && dst->cache_entry.flags.alpha) | ||
307 | d = DP; | ||
308 | return copy_gfx_pt_func_cpu(s, m, c, d); | ||
309 | } | ||
310 | |||
311 | static RGBA_Gfx_Pt_Func | ||
312 | op_copy_color_pt_get(DATA32 col, RGBA_Image *dst) | ||
313 | { | ||
314 | int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; | ||
315 | |||
316 | if ((col >> 24) < 255) | ||
317 | { | ||
318 | if (dst) | ||
319 | dst->cache_entry.flags.alpha = 1; | ||
320 | c = SC; | ||
321 | } | ||
322 | if (col == ((col >> 24) * 0x01010101)) | ||
323 | c = SC_AA; | ||
324 | if (col == 0xffffffff) | ||
325 | c = SC_N; | ||
326 | if (dst && dst->cache_entry.flags.alpha) | ||
327 | d = DP; | ||
328 | return copy_gfx_pt_func_cpu(s, m, c, d); | ||
329 | } | ||
330 | |||
331 | static RGBA_Gfx_Pt_Func | ||
332 | op_copy_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) | ||
333 | { | ||
334 | int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; | ||
335 | |||
336 | if (src_flags.alpha) | ||
337 | { | ||
338 | if (dst) | ||
339 | dst->cache_entry.flags.alpha = 1; | ||
340 | s = SP; | ||
341 | } | ||
342 | if ((col >> 24) < 255) | ||
343 | { | ||
344 | if (dst) | ||
345 | dst->cache_entry.flags.alpha = 1; | ||
346 | c = SC; | ||
347 | } | ||
348 | if (col == ((col >> 24) * 0x01010101)) | ||
349 | c = SC_AA; | ||
350 | if (col == 0xffffffff) | ||
351 | c = SC_N; | ||
352 | if (dst && dst->cache_entry.flags.alpha) | ||
353 | d = DP; | ||
354 | return copy_gfx_pt_func_cpu(s, m, c, d); | ||
355 | } | ||
356 | |||
357 | static RGBA_Gfx_Pt_Func | ||
358 | op_copy_mask_color_pt_get(DATA32 col, RGBA_Image *dst) | ||
359 | { | ||
360 | int s = SP_N, m = SM_AS, c = SC_AN, d = DP; | ||
361 | |||
362 | if (dst) | ||
363 | dst->cache_entry.flags.alpha = 1; | ||
364 | if ((col >> 24) < 255) | ||
365 | c = SC; | ||
366 | if (col == ((col >> 24) * 0x01010101)) | ||
367 | c = SC_AA; | ||
368 | if (col == 0xffffffff) | ||
369 | c = SC_N; | ||
370 | return copy_gfx_pt_func_cpu(s, m, c, d); | ||
371 | } | ||
372 | |||
373 | static RGBA_Gfx_Pt_Func | ||
374 | op_copy_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) | ||
375 | { | ||
376 | int s = SP_AN, m = SM_AS, c = SC_N, d = DP; | ||
377 | |||
378 | if (dst) | ||
379 | dst->cache_entry.flags.alpha = 1; | ||
380 | if (src_flags.alpha) | ||
381 | s = SP; | ||
382 | return copy_gfx_pt_func_cpu(s, m, c, d); | ||
383 | } | ||
384 | |||
385 | |||
386 | static void | ||
387 | op_copy_rel_init(void) | ||
388 | { | ||
389 | memset(op_copy_rel_span_funcs, 0, sizeof(op_copy_rel_span_funcs)); | ||
390 | memset(op_copy_rel_pt_funcs, 0, sizeof(op_copy_rel_pt_funcs)); | ||
391 | #ifdef BUILD_MMX | ||
392 | init_copy_rel_pixel_span_funcs_mmx(); | ||
393 | init_copy_rel_pixel_color_span_funcs_mmx(); | ||
394 | init_copy_rel_pixel_mask_span_funcs_mmx(); | ||
395 | init_copy_rel_color_span_funcs_mmx(); | ||
396 | init_copy_rel_mask_color_span_funcs_mmx(); | ||
397 | |||
398 | init_copy_rel_pixel_pt_funcs_mmx(); | ||
399 | init_copy_rel_pixel_color_pt_funcs_mmx(); | ||
400 | init_copy_rel_pixel_mask_pt_funcs_mmx(); | ||
401 | init_copy_rel_color_pt_funcs_mmx(); | ||
402 | init_copy_rel_mask_color_pt_funcs_mmx(); | ||
403 | #endif | ||
404 | #ifdef BUILD_NEON | ||
405 | init_copy_rel_pixel_span_funcs_neon(); | ||
406 | init_copy_rel_pixel_color_span_funcs_neon(); | ||
407 | init_copy_rel_pixel_mask_span_funcs_neon(); | ||
408 | init_copy_rel_color_span_funcs_neon(); | ||
409 | init_copy_rel_mask_color_span_funcs_neon(); | ||
410 | |||
411 | init_copy_rel_pixel_pt_funcs_neon(); | ||
412 | init_copy_rel_pixel_color_pt_funcs_neon(); | ||
413 | init_copy_rel_pixel_mask_pt_funcs_neon(); | ||
414 | init_copy_rel_color_pt_funcs_neon(); | ||
415 | init_copy_rel_mask_color_pt_funcs_neon(); | ||
416 | #endif | ||
417 | #ifdef BUILD_C | ||
418 | init_copy_rel_pixel_span_funcs_c(); | ||
419 | init_copy_rel_pixel_color_span_funcs_c(); | ||
420 | init_copy_rel_pixel_mask_span_funcs_c(); | ||
421 | init_copy_rel_color_span_funcs_c(); | ||
422 | init_copy_rel_mask_color_span_funcs_c(); | ||
423 | |||
424 | init_copy_rel_pixel_pt_funcs_c(); | ||
425 | init_copy_rel_pixel_color_pt_funcs_c(); | ||
426 | init_copy_rel_pixel_mask_pt_funcs_c(); | ||
427 | init_copy_rel_color_pt_funcs_c(); | ||
428 | init_copy_rel_mask_color_pt_funcs_c(); | ||
429 | #endif | ||
430 | } | ||
431 | |||
432 | static void | ||
433 | op_copy_rel_shutdown(void) | ||
434 | { | ||
435 | } | ||
436 | |||
437 | static RGBA_Gfx_Func | ||
438 | copy_rel_gfx_span_func_cpu(int s, int m, int c, int d) | ||
439 | { | ||
440 | RGBA_Gfx_Func func = NULL; | ||
441 | int cpu = CPU_N; | ||
442 | #ifdef BUILD_MMX | ||
443 | if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) | ||
444 | { | ||
445 | cpu = CPU_MMX; | ||
446 | func = op_copy_rel_span_funcs[s][m][c][d][cpu]; | ||
447 | if (func) return func; | ||
448 | } | ||
449 | #endif | ||
450 | #ifdef BUILD_NEON | ||
451 | if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) | ||
452 | { | ||
453 | cpu = CPU_NEON; | ||
454 | func = op_copy_rel_span_funcs[s][m][c][d][cpu]; | ||
455 | if (func) return func; | ||
456 | } | ||
457 | #endif | ||
458 | #ifdef BUILD_C | ||
459 | cpu = CPU_C; | ||
460 | func = op_copy_rel_span_funcs[s][m][c][d][cpu]; | ||
461 | if (func) return func; | ||
462 | #endif | ||
463 | return func; | ||
464 | } | ||
465 | |||
466 | static RGBA_Gfx_Func | ||
467 | op_copy_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) | ||
468 | { | ||
469 | int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; | ||
470 | |||
471 | if (src && src->cache_entry.flags.alpha) | ||
472 | { | ||
473 | if (dst) | ||
474 | dst->cache_entry.flags.alpha = 1; | ||
475 | s = SP; | ||
476 | } | ||
477 | if (dst && dst->cache_entry.flags.alpha) | ||
478 | d = DP; | ||
479 | return copy_rel_gfx_span_func_cpu(s, m, c, d); | ||
480 | } | ||
481 | |||
482 | static RGBA_Gfx_Func | ||
483 | op_copy_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) | ||
484 | { | ||
485 | int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; | ||
486 | |||
487 | if ((col >> 24) < 255) | ||
488 | { | ||
489 | if (dst) | ||
490 | dst->cache_entry.flags.alpha = 1; | ||
491 | c = SC; | ||
492 | } | ||
493 | if (col == ((col >> 24) * 0x01010101)) | ||
494 | c = SC_AA; | ||
495 | if (col == 0xffffffff) | ||
496 | c = SC_N; | ||
497 | if (dst && dst->cache_entry.flags.alpha) | ||
498 | d = DP; | ||
499 | return copy_rel_gfx_span_func_cpu(s, m, c, d); | ||
500 | } | ||
501 | |||
502 | static RGBA_Gfx_Func | ||
503 | op_copy_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) | ||
504 | { | ||
505 | int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; | ||
506 | |||
507 | if (src && src->cache_entry.flags.alpha) | ||
508 | { | ||
509 | if (dst) | ||
510 | dst->cache_entry.flags.alpha = 1; | ||
511 | s = SP; | ||
512 | } | ||
513 | if ((col >> 24) < 255) | ||
514 | { | ||
515 | if (dst) | ||
516 | dst->cache_entry.flags.alpha = 1; | ||
517 | c = SC; | ||
518 | } | ||
519 | if (col == ((col >> 24) * 0x01010101)) | ||
520 | c = SC_AA; | ||
521 | if (col == 0xffffffff) | ||
522 | c = SC_N; | ||
523 | if (dst && dst->cache_entry.flags.alpha) | ||
524 | d = DP; | ||
525 | return copy_rel_gfx_span_func_cpu(s, m, c, d); | ||
526 | } | ||
527 | |||
528 | static RGBA_Gfx_Func | ||
529 | op_copy_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) | ||
530 | { | ||
531 | int s = SP_N, m = SM_AS, c = SC_AN, d = DP; | ||
532 | |||
533 | if (dst) | ||
534 | dst->cache_entry.flags.alpha = 1; | ||
535 | if ((col >> 24) < 255) | ||
536 | c = SC; | ||
537 | if (col == ((col >> 24) * 0x01010101)) | ||
538 | c = SC_AA; | ||
539 | if (col == 0xffffffff) | ||
540 | c = SC_N; | ||
541 | return copy_rel_gfx_span_func_cpu(s, m, c, d); | ||
542 | } | ||
543 | |||
544 | static RGBA_Gfx_Func | ||
545 | op_copy_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) | ||
546 | { | ||
547 | int s = SP_AN, m = SM_AS, c = SC_N, d = DP; | ||
548 | |||
549 | if (dst) | ||
550 | dst->cache_entry.flags.alpha = 1; | ||
551 | if (src && src->cache_entry.flags.alpha) | ||
552 | s = SP; | ||
553 | return copy_rel_gfx_span_func_cpu(s, m, c, d); | ||
554 | } | ||
555 | |||
556 | static RGBA_Gfx_Pt_Func | ||
557 | copy_rel_gfx_pt_func_cpu(int s, int m, int c, int d) | ||
558 | { | ||
559 | RGBA_Gfx_Pt_Func func = NULL; | ||
560 | int cpu = CPU_N; | ||
561 | #ifdef BUILD_MMX | ||
562 | if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) | ||
563 | { | ||
564 | cpu = CPU_MMX; | ||
565 | func = op_copy_rel_pt_funcs[s][m][c][d][cpu]; | ||
566 | if (func) return func; | ||
567 | } | ||
568 | #endif | ||
569 | #ifdef BUILD_NEON | ||
570 | if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) | ||
571 | { | ||
572 | cpu = CPU_NEON; | ||
573 | func = op_copy_rel_pt_funcs[s][m][c][d][cpu]; | ||
574 | if (func) return func; | ||
575 | } | ||
576 | #endif | ||
577 | #ifdef BUILD_C | ||
578 | cpu = CPU_C; | ||
579 | func = op_copy_rel_pt_funcs[s][m][c][d][cpu]; | ||
580 | if (func) return func; | ||
581 | #endif | ||
582 | return func; | ||
583 | } | ||
584 | |||
585 | static RGBA_Gfx_Pt_Func | ||
586 | op_copy_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) | ||
587 | { | ||
588 | int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; | ||
589 | |||
590 | if (src_flags.alpha) | ||
591 | { | ||
592 | if (dst) | ||
593 | dst->cache_entry.flags.alpha = 1; | ||
594 | s = SP; | ||
595 | } | ||
596 | if (dst && dst->cache_entry.flags.alpha) | ||
597 | d = DP; | ||
598 | return copy_rel_gfx_pt_func_cpu(s, m, c, d); | ||
599 | } | ||
600 | |||
601 | /* XXX: not used | ||
602 | static RGBA_Gfx_Pt_Func | ||
603 | op_copy_rel_color_pt_get(DATA32 col, RGBA_Image *dst) | ||
604 | { | ||
605 | int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; | ||
606 | |||
607 | if ((col >> 24) < 255) | ||
608 | { | ||
609 | if (dst) | ||
610 | dst->cache_entry.flags.alpha = 1; | ||
611 | c = SC; | ||
612 | } | ||
613 | if (col == ((col >> 24) * 0x01010101)) | ||
614 | c = SC_AA; | ||
615 | if (col == 0xffffffff) | ||
616 | c = SC_N; | ||
617 | if (dst && dst->cache_entry.flags.alpha) | ||
618 | d = DP; | ||
619 | return copy_rel_gfx_pt_func_cpu(s, m, c, d); | ||
620 | } | ||
621 | */ | ||
622 | |||
623 | static RGBA_Gfx_Pt_Func | ||
624 | op_copy_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) | ||
625 | { | ||
626 | int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; | ||
627 | |||
628 | if (src_flags.alpha) | ||
629 | { | ||
630 | if (dst) | ||
631 | dst->cache_entry.flags.alpha = 1; | ||
632 | s = SP; | ||
633 | } | ||
634 | if ((col >> 24) < 255) | ||
635 | { | ||
636 | if (dst) | ||
637 | dst->cache_entry.flags.alpha = 1; | ||
638 | c = SC; | ||
639 | } | ||
640 | if (col == ((col >> 24) * 0x01010101)) | ||
641 | c = SC_AA; | ||
642 | if (col == 0xffffffff) | ||
643 | c = SC_N; | ||
644 | if (dst && dst->cache_entry.flags.alpha) | ||
645 | d = DP; | ||
646 | return copy_rel_gfx_pt_func_cpu(s, m, c, d); | ||
647 | } | ||
648 | |||
649 | static RGBA_Gfx_Pt_Func | ||
650 | op_copy_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst) | ||
651 | { | ||
652 | int s = SP_N, m = SM_AS, c = SC_AN, d = DP; | ||
653 | |||
654 | if (dst) | ||
655 | dst->cache_entry.flags.alpha = 1; | ||
656 | if ((col >> 24) < 255) | ||
657 | c = SC; | ||
658 | if (col == ((col >> 24) * 0x01010101)) | ||
659 | c = SC_AA; | ||
660 | if (col == 0xffffffff) | ||
661 | c = SC_N; | ||
662 | return copy_rel_gfx_pt_func_cpu(s, m, c, d); | ||
663 | } | ||
664 | |||
665 | static RGBA_Gfx_Pt_Func | ||
666 | op_copy_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) | ||
667 | { | ||
668 | int s = SP_AN, m = SM_AS, c = SC_N, d = DP; | ||
669 | |||
670 | if (dst) | ||
671 | dst->cache_entry.flags.alpha = 1; | ||
672 | if (src_flags.alpha) | ||
673 | s = SP; | ||
674 | return copy_rel_gfx_pt_func_cpu(s, m, c, d); | ||
675 | } | ||