diff options
author | David Walter Seikel | 2013-01-13 17:29:19 +1000 |
---|---|---|
committer | David Walter Seikel | 2013-01-13 17:29:19 +1000 |
commit | 07274513e984f0b5544586c74508ccd16e7dcafa (patch) | |
tree | b32ff2a9136fbc1a4a6a0ed1e4d79cde0f5f16d9 /libraries/evas/src/lib/engines/common/evas_op_blend_main_.c | |
parent | Added Irrlicht 1.8, but without all the Windows binaries. (diff) | |
download | SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.zip SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.gz SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.bz2 SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.xz |
Remove EFL, since it's been released now.
Diffstat (limited to '')
-rw-r--r-- | libraries/evas/src/lib/engines/common/evas_op_blend_main_.c | 671 |
1 files changed, 0 insertions, 671 deletions
diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend_main_.c b/libraries/evas/src/lib/engines/common/evas_op_blend_main_.c deleted file mode 100644 index a1a5de8..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_blend_main_.c +++ /dev/null | |||
@@ -1,671 +0,0 @@ | |||
1 | #include "evas_common.h" | ||
2 | |||
3 | RGBA_Gfx_Func op_blend_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; | ||
4 | RGBA_Gfx_Pt_Func op_blend_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; | ||
5 | |||
6 | static void op_blend_init(void); | ||
7 | static void op_blend_shutdown(void); | ||
8 | |||
9 | static RGBA_Gfx_Func op_blend_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); | ||
10 | static RGBA_Gfx_Func op_blend_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); | ||
11 | static RGBA_Gfx_Func op_blend_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); | ||
12 | static RGBA_Gfx_Func op_blend_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); | ||
13 | static RGBA_Gfx_Func op_blend_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); | ||
14 | |||
15 | static RGBA_Gfx_Pt_Func op_blend_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); | ||
16 | static RGBA_Gfx_Pt_Func op_blend_color_pt_get(DATA32 col, RGBA_Image *dst); | ||
17 | static RGBA_Gfx_Pt_Func op_blend_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); | ||
18 | static RGBA_Gfx_Pt_Func op_blend_mask_color_pt_get(DATA32 col, RGBA_Image *dst); | ||
19 | static RGBA_Gfx_Pt_Func op_blend_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); | ||
20 | |||
21 | static RGBA_Gfx_Compositor _composite_blend = { "blend", | ||
22 | op_blend_init, op_blend_shutdown, | ||
23 | op_blend_pixel_span_get, op_blend_color_span_get, | ||
24 | op_blend_pixel_color_span_get, op_blend_mask_color_span_get, | ||
25 | op_blend_pixel_mask_span_get, | ||
26 | op_blend_pixel_pt_get, op_blend_color_pt_get, | ||
27 | op_blend_pixel_color_pt_get, op_blend_mask_color_pt_get, | ||
28 | op_blend_pixel_mask_pt_get | ||
29 | }; | ||
30 | |||
31 | RGBA_Gfx_Compositor * | ||
32 | evas_common_gfx_compositor_blend_get(void) | ||
33 | { | ||
34 | return &(_composite_blend); | ||
35 | } | ||
36 | |||
37 | |||
38 | RGBA_Gfx_Func op_blend_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; | ||
39 | RGBA_Gfx_Pt_Func op_blend_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; | ||
40 | |||
41 | static void op_blend_rel_init(void); | ||
42 | static void op_blend_rel_shutdown(void); | ||
43 | |||
44 | static RGBA_Gfx_Func op_blend_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); | ||
45 | static RGBA_Gfx_Func op_blend_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); | ||
46 | static RGBA_Gfx_Func op_blend_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); | ||
47 | static RGBA_Gfx_Func op_blend_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); | ||
48 | static RGBA_Gfx_Func op_blend_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); | ||
49 | |||
50 | static RGBA_Gfx_Pt_Func op_blend_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); | ||
51 | static RGBA_Gfx_Pt_Func op_blend_rel_color_pt_get(DATA32 col, RGBA_Image *dst); | ||
52 | static RGBA_Gfx_Pt_Func op_blend_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); | ||
53 | static RGBA_Gfx_Pt_Func op_blend_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst); | ||
54 | static RGBA_Gfx_Pt_Func op_blend_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); | ||
55 | |||
56 | static RGBA_Gfx_Compositor _composite_blend_rel = { "blend_rel", | ||
57 | op_blend_rel_init, op_blend_rel_shutdown, | ||
58 | op_blend_rel_pixel_span_get, op_blend_rel_color_span_get, | ||
59 | op_blend_rel_pixel_color_span_get, op_blend_rel_mask_color_span_get, | ||
60 | op_blend_rel_pixel_mask_span_get, | ||
61 | op_blend_rel_pixel_pt_get, op_blend_rel_color_pt_get, | ||
62 | op_blend_rel_pixel_color_pt_get, op_blend_rel_mask_color_pt_get, | ||
63 | op_blend_rel_pixel_mask_pt_get | ||
64 | }; | ||
65 | |||
66 | RGBA_Gfx_Compositor * | ||
67 | evas_common_gfx_compositor_blend_rel_get(void) | ||
68 | { | ||
69 | return &(_composite_blend_rel); | ||
70 | } | ||
71 | |||
72 | |||
73 | # include "./evas_op_blend/op_blend_pixel_.c" | ||
74 | # include "./evas_op_blend/op_blend_color_.c" | ||
75 | # include "./evas_op_blend/op_blend_pixel_color_.c" | ||
76 | # include "./evas_op_blend/op_blend_pixel_mask_.c" | ||
77 | # include "./evas_op_blend/op_blend_mask_color_.c" | ||
78 | //# include "./evas_op_blend/op_blend_pixel_mask_color_.c" | ||
79 | |||
80 | # include "./evas_op_blend/op_blend_pixel_i386.c" | ||
81 | # include "./evas_op_blend/op_blend_color_i386.c" | ||
82 | # include "./evas_op_blend/op_blend_pixel_color_i386.c" | ||
83 | # include "./evas_op_blend/op_blend_pixel_mask_i386.c" | ||
84 | # include "./evas_op_blend/op_blend_mask_color_i386.c" | ||
85 | //# include "./evas_op_blend/op_blend_pixel_mask_color_i386.c" | ||
86 | |||
87 | # include "./evas_op_blend/op_blend_pixel_neon.c" | ||
88 | # include "./evas_op_blend/op_blend_color_neon.c" | ||
89 | # include "./evas_op_blend/op_blend_pixel_color_neon.c" | ||
90 | # include "./evas_op_blend/op_blend_pixel_mask_neon.c" | ||
91 | # include "./evas_op_blend/op_blend_mask_color_neon.c" | ||
92 | //# include "./evas_op_blend/op_blend_pixel_mask_color_neon.c" | ||
93 | |||
94 | #ifdef BUILD_SSE3 | ||
95 | void evas_common_op_blend_init_sse3(void); | ||
96 | #endif | ||
97 | |||
98 | static void | ||
99 | op_blend_init(void) | ||
100 | { | ||
101 | memset(op_blend_span_funcs, 0, sizeof(op_blend_span_funcs)); | ||
102 | memset(op_blend_pt_funcs, 0, sizeof(op_blend_pt_funcs)); | ||
103 | #ifdef BUILD_SSE3 | ||
104 | evas_common_op_blend_init_sse3(); | ||
105 | #endif | ||
106 | #ifdef BUILD_MMX | ||
107 | init_blend_pixel_span_funcs_mmx(); | ||
108 | init_blend_pixel_color_span_funcs_mmx(); | ||
109 | init_blend_pixel_mask_span_funcs_mmx(); | ||
110 | init_blend_color_span_funcs_mmx(); | ||
111 | init_blend_mask_color_span_funcs_mmx(); | ||
112 | |||
113 | init_blend_pixel_pt_funcs_mmx(); | ||
114 | init_blend_pixel_color_pt_funcs_mmx(); | ||
115 | init_blend_pixel_mask_pt_funcs_mmx(); | ||
116 | init_blend_color_pt_funcs_mmx(); | ||
117 | init_blend_mask_color_pt_funcs_mmx(); | ||
118 | #endif | ||
119 | #ifdef BUILD_NEON | ||
120 | init_blend_pixel_span_funcs_neon(); | ||
121 | init_blend_pixel_color_span_funcs_neon(); | ||
122 | init_blend_pixel_mask_span_funcs_neon(); | ||
123 | init_blend_color_span_funcs_neon(); | ||
124 | init_blend_mask_color_span_funcs_neon(); | ||
125 | |||
126 | init_blend_pixel_pt_funcs_neon(); | ||
127 | init_blend_pixel_color_pt_funcs_neon(); | ||
128 | init_blend_pixel_mask_pt_funcs_neon(); | ||
129 | init_blend_color_pt_funcs_neon(); | ||
130 | init_blend_mask_color_pt_funcs_neon(); | ||
131 | #endif | ||
132 | #ifdef BUILD_C | ||
133 | init_blend_pixel_span_funcs_c(); | ||
134 | init_blend_pixel_color_span_funcs_c(); | ||
135 | init_blend_pixel_mask_span_funcs_c(); | ||
136 | init_blend_color_span_funcs_c(); | ||
137 | init_blend_mask_color_span_funcs_c(); | ||
138 | |||
139 | init_blend_pixel_pt_funcs_c(); | ||
140 | init_blend_pixel_color_pt_funcs_c(); | ||
141 | init_blend_pixel_mask_pt_funcs_c(); | ||
142 | init_blend_color_pt_funcs_c(); | ||
143 | init_blend_mask_color_pt_funcs_c(); | ||
144 | #endif | ||
145 | } | ||
146 | |||
147 | static void | ||
148 | op_blend_shutdown(void) | ||
149 | { | ||
150 | } | ||
151 | |||
152 | static RGBA_Gfx_Func | ||
153 | blend_gfx_span_func_cpu(int s, int m, int c, int d) | ||
154 | { | ||
155 | RGBA_Gfx_Func func = NULL; | ||
156 | int cpu = CPU_N; | ||
157 | #ifdef BUILD_SSE3 | ||
158 | if (evas_common_cpu_has_feature(CPU_FEATURE_SSE3)) | ||
159 | { | ||
160 | cpu = CPU_SSE3; | ||
161 | func = op_blend_span_funcs[s][m][c][d][cpu]; | ||
162 | if(func) return func; | ||
163 | } | ||
164 | #endif | ||
165 | #ifdef BUILD_MMX | ||
166 | if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) | ||
167 | { | ||
168 | cpu = CPU_MMX; | ||
169 | func = op_blend_span_funcs[s][m][c][d][cpu]; | ||
170 | if (func) return func; | ||
171 | } | ||
172 | #endif | ||
173 | #ifdef BUILD_NEON | ||
174 | if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) | ||
175 | { | ||
176 | cpu = CPU_NEON; | ||
177 | func = op_blend_span_funcs[s][m][c][d][cpu]; | ||
178 | if (func) return func; | ||
179 | } | ||
180 | #endif | ||
181 | #ifdef BUILD_C | ||
182 | cpu = CPU_C; | ||
183 | func = op_blend_span_funcs[s][m][c][d][cpu]; | ||
184 | if (func) return func; | ||
185 | #endif | ||
186 | return func; | ||
187 | } | ||
188 | |||
189 | static RGBA_Gfx_Func | ||
190 | op_blend_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) | ||
191 | { | ||
192 | int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; | ||
193 | |||
194 | if (src && src->cache_entry.flags.alpha) | ||
195 | { | ||
196 | s = SP; | ||
197 | if (src->cache_entry.flags.alpha_sparse) | ||
198 | s = SP_AS; | ||
199 | } | ||
200 | if (dst && dst->cache_entry.flags.alpha) | ||
201 | d = DP; | ||
202 | return blend_gfx_span_func_cpu(s, m, c, d); | ||
203 | } | ||
204 | |||
205 | static RGBA_Gfx_Func | ||
206 | op_blend_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) | ||
207 | { | ||
208 | int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; | ||
209 | |||
210 | if ((col >> 24) < 255) | ||
211 | c = SC; | ||
212 | if (col == ((col >> 24) * 0x01010101)) | ||
213 | c = SC_AA; | ||
214 | if (col == 0xffffffff) | ||
215 | c = SC_N; | ||
216 | if (dst && dst->cache_entry.flags.alpha) | ||
217 | d = DP; | ||
218 | return blend_gfx_span_func_cpu(s, m, c, d); | ||
219 | } | ||
220 | |||
221 | static RGBA_Gfx_Func | ||
222 | op_blend_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) | ||
223 | { | ||
224 | int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; | ||
225 | |||
226 | if (src && src->cache_entry.flags.alpha) | ||
227 | { | ||
228 | s = SP; | ||
229 | if (src->cache_entry.flags.alpha_sparse) | ||
230 | s = SP_AS; | ||
231 | } | ||
232 | if ((col >> 24) < 255) | ||
233 | c = SC; | ||
234 | if (col == ((col >> 24) * 0x01010101)) | ||
235 | c = SC_AA; | ||
236 | if (col == 0xffffffff) | ||
237 | c = SC_N; | ||
238 | if (dst && dst->cache_entry.flags.alpha) | ||
239 | d = DP; | ||
240 | return blend_gfx_span_func_cpu(s, m, c, d); | ||
241 | } | ||
242 | |||
243 | static RGBA_Gfx_Func | ||
244 | op_blend_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) | ||
245 | { | ||
246 | int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; | ||
247 | |||
248 | if ((col >> 24) < 255) | ||
249 | c = SC; | ||
250 | if (col == ((col >> 24) * 0x01010101)) | ||
251 | c = SC_AA; | ||
252 | if (col == 0xffffffff) | ||
253 | c = SC_N; | ||
254 | if (dst && dst->cache_entry.flags.alpha) | ||
255 | d = DP; | ||
256 | return blend_gfx_span_func_cpu(s, m, c, d); | ||
257 | } | ||
258 | |||
259 | static RGBA_Gfx_Func | ||
260 | op_blend_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) | ||
261 | { | ||
262 | int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; | ||
263 | |||
264 | if (src && src->cache_entry.flags.alpha) | ||
265 | { | ||
266 | s = SP; | ||
267 | if (src->cache_entry.flags.alpha_sparse) | ||
268 | s = SP_AS; | ||
269 | } | ||
270 | if (dst && dst->cache_entry.flags.alpha) | ||
271 | d = DP; | ||
272 | return blend_gfx_span_func_cpu(s, m, c, d); | ||
273 | } | ||
274 | |||
275 | |||
276 | static RGBA_Gfx_Pt_Func | ||
277 | blend_gfx_pt_func_cpu(int s, int m, int c, int d) | ||
278 | { | ||
279 | RGBA_Gfx_Pt_Func func = NULL; | ||
280 | int cpu = CPU_N; | ||
281 | #ifdef BUILD_SSE3 | ||
282 | if(evas_common_cpu_has_feature(CPU_FEATURE_SSE3)) | ||
283 | { | ||
284 | cpu = CPU_SSE3; | ||
285 | func = op_blend_pt_funcs[s][m][c][d][cpu]; | ||
286 | if(func) return func; | ||
287 | } | ||
288 | #endif | ||
289 | #ifdef BUILD_MMX | ||
290 | if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) | ||
291 | { | ||
292 | cpu = CPU_MMX; | ||
293 | func = op_blend_pt_funcs[s][m][c][d][cpu]; | ||
294 | if (func) return func; | ||
295 | } | ||
296 | #endif | ||
297 | #ifdef BUILD_NEON | ||
298 | if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) | ||
299 | { | ||
300 | cpu = CPU_NEON; | ||
301 | func = op_blend_pt_funcs[s][m][c][d][cpu]; | ||
302 | if (func) return func; | ||
303 | } | ||
304 | #endif | ||
305 | #ifdef BUILD_C | ||
306 | cpu = CPU_C; | ||
307 | func = op_blend_pt_funcs[s][m][c][d][cpu]; | ||
308 | if (func) return func; | ||
309 | #endif | ||
310 | return func; | ||
311 | } | ||
312 | |||
313 | static RGBA_Gfx_Pt_Func | ||
314 | op_blend_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) | ||
315 | { | ||
316 | int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; | ||
317 | |||
318 | if (src_flags.alpha) | ||
319 | s = SP; | ||
320 | if (dst && dst->cache_entry.flags.alpha) | ||
321 | d = DP; | ||
322 | return blend_gfx_pt_func_cpu(s, m, c, d); | ||
323 | } | ||
324 | |||
325 | static RGBA_Gfx_Pt_Func | ||
326 | op_blend_color_pt_get(DATA32 col, RGBA_Image *dst) | ||
327 | { | ||
328 | int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; | ||
329 | |||
330 | if ((col >> 24) < 255) | ||
331 | c = SC; | ||
332 | if (col == ((col >> 24) * 0x01010101)) | ||
333 | c = SC_AA; | ||
334 | if (col == 0xffffffff) | ||
335 | c = SC_N; | ||
336 | if (dst && dst->cache_entry.flags.alpha) | ||
337 | d = DP; | ||
338 | return blend_gfx_pt_func_cpu(s, m, c, d); | ||
339 | } | ||
340 | |||
341 | static RGBA_Gfx_Pt_Func | ||
342 | op_blend_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) | ||
343 | { | ||
344 | int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; | ||
345 | |||
346 | if (src_flags.alpha) | ||
347 | s = SP; | ||
348 | if ((col >> 24) < 255) | ||
349 | c = SC; | ||
350 | if (col == ((col >> 24) * 0x01010101)) | ||
351 | c = SC_AA; | ||
352 | if (col == 0xffffffff) | ||
353 | c = SC_N; | ||
354 | if (dst && dst->cache_entry.flags.alpha) | ||
355 | d = DP; | ||
356 | return blend_gfx_pt_func_cpu(s, m, c, d); | ||
357 | } | ||
358 | |||
359 | static RGBA_Gfx_Pt_Func | ||
360 | op_blend_mask_color_pt_get(DATA32 col, RGBA_Image *dst) | ||
361 | { | ||
362 | int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; | ||
363 | |||
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 | if (dst && dst->cache_entry.flags.alpha) | ||
371 | d = DP; | ||
372 | return blend_gfx_pt_func_cpu(s, m, c, d); | ||
373 | } | ||
374 | |||
375 | static RGBA_Gfx_Pt_Func | ||
376 | op_blend_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) | ||
377 | { | ||
378 | int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; | ||
379 | |||
380 | if (src_flags.alpha) | ||
381 | s = SP; | ||
382 | if (dst && dst->cache_entry.flags.alpha) | ||
383 | d = DP; | ||
384 | return blend_gfx_pt_func_cpu(s, m, c, d); | ||
385 | } | ||
386 | |||
387 | void evas_common_op_blend_rel_init_sse3(void); | ||
388 | |||
389 | static void | ||
390 | op_blend_rel_init(void) | ||
391 | { | ||
392 | memset(op_blend_rel_span_funcs, 0, sizeof(op_blend_rel_span_funcs)); | ||
393 | memset(op_blend_rel_pt_funcs, 0, sizeof(op_blend_rel_pt_funcs)); | ||
394 | #ifdef BUILD_SSE3 | ||
395 | evas_common_op_blend_rel_init_sse3(); | ||
396 | #endif | ||
397 | #ifdef BUILD_MMX | ||
398 | init_blend_rel_pixel_span_funcs_mmx(); | ||
399 | init_blend_rel_pixel_color_span_funcs_mmx(); | ||
400 | init_blend_rel_pixel_mask_span_funcs_mmx(); | ||
401 | init_blend_rel_color_span_funcs_mmx(); | ||
402 | init_blend_rel_mask_color_span_funcs_mmx(); | ||
403 | |||
404 | init_blend_rel_pixel_pt_funcs_mmx(); | ||
405 | init_blend_rel_pixel_color_pt_funcs_mmx(); | ||
406 | init_blend_rel_pixel_mask_pt_funcs_mmx(); | ||
407 | init_blend_rel_color_pt_funcs_mmx(); | ||
408 | init_blend_rel_mask_color_pt_funcs_mmx(); | ||
409 | #endif | ||
410 | #ifdef BUILD_NEON | ||
411 | init_blend_rel_pixel_span_funcs_neon(); | ||
412 | init_blend_rel_pixel_color_span_funcs_neon(); | ||
413 | init_blend_rel_pixel_mask_span_funcs_neon(); | ||
414 | init_blend_rel_color_span_funcs_neon(); | ||
415 | init_blend_rel_mask_color_span_funcs_neon(); | ||
416 | |||
417 | init_blend_rel_pixel_pt_funcs_neon(); | ||
418 | init_blend_rel_pixel_color_pt_funcs_neon(); | ||
419 | init_blend_rel_pixel_mask_pt_funcs_neon(); | ||
420 | init_blend_rel_color_pt_funcs_neon(); | ||
421 | init_blend_rel_mask_color_pt_funcs_neon(); | ||
422 | #endif | ||
423 | #ifdef BUILD_C | ||
424 | init_blend_rel_pixel_span_funcs_c(); | ||
425 | init_blend_rel_pixel_color_span_funcs_c(); | ||
426 | init_blend_rel_pixel_mask_span_funcs_c(); | ||
427 | init_blend_rel_color_span_funcs_c(); | ||
428 | init_blend_rel_mask_color_span_funcs_c(); | ||
429 | |||
430 | init_blend_rel_pixel_pt_funcs_c(); | ||
431 | init_blend_rel_pixel_color_pt_funcs_c(); | ||
432 | init_blend_rel_pixel_mask_pt_funcs_c(); | ||
433 | init_blend_rel_color_pt_funcs_c(); | ||
434 | init_blend_rel_mask_color_pt_funcs_c(); | ||
435 | #endif | ||
436 | } | ||
437 | |||
438 | static void | ||
439 | op_blend_rel_shutdown(void) | ||
440 | { | ||
441 | } | ||
442 | |||
443 | static RGBA_Gfx_Func | ||
444 | blend_rel_gfx_span_func_cpu(int s, int m, int c, int d) | ||
445 | { | ||
446 | RGBA_Gfx_Func func = NULL; | ||
447 | int cpu = CPU_N; | ||
448 | #ifdef BUILD_SSE3 | ||
449 | if (evas_common_cpu_has_feature(CPU_FEATURE_SSE3)) | ||
450 | { | ||
451 | cpu = CPU_SSE3; | ||
452 | func = op_blend_rel_span_funcs[s][m][c][d][cpu]; | ||
453 | if(func) return func; | ||
454 | } | ||
455 | #endif | ||
456 | #ifdef BUILD_MMX | ||
457 | if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) | ||
458 | { | ||
459 | cpu = CPU_MMX; | ||
460 | func = op_blend_rel_span_funcs[s][m][c][d][cpu]; | ||
461 | if (func) return func; | ||
462 | } | ||
463 | #endif | ||
464 | #ifdef BUILD_NEON | ||
465 | if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) | ||
466 | { | ||
467 | cpu = CPU_NEON; | ||
468 | func = op_blend_rel_span_funcs[s][m][c][d][cpu]; | ||
469 | if (func) return func; | ||
470 | } | ||
471 | #endif | ||
472 | #ifdef BUILD_C | ||
473 | cpu = CPU_C; | ||
474 | func = op_blend_rel_span_funcs[s][m][c][d][cpu]; | ||
475 | if (func) return func; | ||
476 | #endif | ||
477 | return func; | ||
478 | } | ||
479 | |||
480 | static RGBA_Gfx_Func | ||
481 | op_blend_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) | ||
482 | { | ||
483 | int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; | ||
484 | |||
485 | if (src && src->cache_entry.flags.alpha) | ||
486 | { | ||
487 | s = SP; | ||
488 | if (src->cache_entry.flags.alpha_sparse) | ||
489 | s = SP_AS; | ||
490 | } | ||
491 | if (dst && dst->cache_entry.flags.alpha) | ||
492 | d = DP; | ||
493 | return blend_rel_gfx_span_func_cpu(s, m, c, d); | ||
494 | } | ||
495 | |||
496 | static RGBA_Gfx_Func | ||
497 | op_blend_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) | ||
498 | { | ||
499 | int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; | ||
500 | |||
501 | if ((col >> 24) < 255) | ||
502 | c = SC; | ||
503 | if (col == ((col >> 24) * 0x01010101)) | ||
504 | c = SC_AA; | ||
505 | if (col == 0xffffffff) | ||
506 | c = SC_N; | ||
507 | if (dst && dst->cache_entry.flags.alpha) | ||
508 | d = DP; | ||
509 | return blend_rel_gfx_span_func_cpu(s, m, c, d); | ||
510 | } | ||
511 | |||
512 | static RGBA_Gfx_Func | ||
513 | op_blend_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) | ||
514 | { | ||
515 | int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; | ||
516 | |||
517 | if (src && src->cache_entry.flags.alpha) | ||
518 | s = SP; | ||
519 | if ((col >> 24) < 255) | ||
520 | c = SC; | ||
521 | if (col == ((col >> 24) * 0x01010101)) | ||
522 | c = SC_AA; | ||
523 | if (col == 0xffffffff) | ||
524 | c = SC_N; | ||
525 | if (dst && dst->cache_entry.flags.alpha) | ||
526 | d = DP; | ||
527 | return blend_rel_gfx_span_func_cpu(s, m, c, d); | ||
528 | } | ||
529 | |||
530 | static RGBA_Gfx_Func | ||
531 | op_blend_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) | ||
532 | { | ||
533 | int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; | ||
534 | |||
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 | if (dst && dst->cache_entry.flags.alpha) | ||
542 | d = DP; | ||
543 | return blend_rel_gfx_span_func_cpu(s, m, c, d); | ||
544 | } | ||
545 | |||
546 | static RGBA_Gfx_Func | ||
547 | op_blend_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) | ||
548 | { | ||
549 | int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; | ||
550 | |||
551 | if (src && src->cache_entry.flags.alpha) | ||
552 | { | ||
553 | s = SP; | ||
554 | if (src->cache_entry.flags.alpha_sparse) | ||
555 | s = SP_AS; | ||
556 | } | ||
557 | if (dst && dst->cache_entry.flags.alpha) | ||
558 | d = DP; | ||
559 | return blend_rel_gfx_span_func_cpu(s, m, c, d); | ||
560 | } | ||
561 | |||
562 | static RGBA_Gfx_Pt_Func | ||
563 | blend_rel_gfx_pt_func_cpu(int s, int m, int c, int d) | ||
564 | { | ||
565 | RGBA_Gfx_Pt_Func func = NULL; | ||
566 | int cpu = CPU_N; | ||
567 | #ifdef BUILD_SSE3 | ||
568 | if (evas_common_cpu_has_feature(CPU_FEATURE_SSE3)) | ||
569 | { | ||
570 | cpu = CPU_SSE3; | ||
571 | func = op_blend_rel_pt_funcs[s][m][c][d][cpu]; | ||
572 | if(func) return func; | ||
573 | } | ||
574 | #endif | ||
575 | #ifdef BUILD_MMX | ||
576 | if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) | ||
577 | { | ||
578 | cpu = CPU_MMX; | ||
579 | func = op_blend_rel_pt_funcs[s][m][c][d][cpu]; | ||
580 | if (func) return func; | ||
581 | } | ||
582 | #endif | ||
583 | #ifdef BUILD_NEON | ||
584 | if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) | ||
585 | { | ||
586 | cpu = CPU_NEON; | ||
587 | func = op_blend_rel_pt_funcs[s][m][c][d][cpu]; | ||
588 | if (func) return func; | ||
589 | } | ||
590 | #endif | ||
591 | #ifdef BUILD_C | ||
592 | cpu = CPU_C; | ||
593 | func = op_blend_rel_pt_funcs[s][m][c][d][cpu]; | ||
594 | if (func) return func; | ||
595 | #endif | ||
596 | return func; | ||
597 | } | ||
598 | |||
599 | static RGBA_Gfx_Pt_Func | ||
600 | op_blend_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) | ||
601 | { | ||
602 | int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; | ||
603 | |||
604 | if (src_flags.alpha) | ||
605 | s = SP; | ||
606 | if (dst && dst->cache_entry.flags.alpha) | ||
607 | d = DP; | ||
608 | return blend_rel_gfx_pt_func_cpu(s, m, c, d); | ||
609 | } | ||
610 | |||
611 | static RGBA_Gfx_Pt_Func | ||
612 | op_blend_rel_color_pt_get(DATA32 col, RGBA_Image *dst) | ||
613 | { | ||
614 | int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; | ||
615 | |||
616 | if ((col >> 24) < 255) | ||
617 | c = SC; | ||
618 | if (col == ((col >> 24) * 0x01010101)) | ||
619 | c = SC_AA; | ||
620 | if (col == 0xffffffff) | ||
621 | c = SC_N; | ||
622 | if (dst && dst->cache_entry.flags.alpha) | ||
623 | d = DP; | ||
624 | return blend_rel_gfx_pt_func_cpu(s, m, c, d); | ||
625 | } | ||
626 | |||
627 | static RGBA_Gfx_Pt_Func | ||
628 | op_blend_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) | ||
629 | { | ||
630 | int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; | ||
631 | |||
632 | if (src_flags.alpha) | ||
633 | s = SP; | ||
634 | if ((col >> 24) < 255) | ||
635 | c = SC; | ||
636 | if (col == ((col >> 24) * 0x01010101)) | ||
637 | c = SC_AA; | ||
638 | if (col == 0xffffffff) | ||
639 | c = SC_N; | ||
640 | if (dst && dst->cache_entry.flags.alpha) | ||
641 | d = DP; | ||
642 | return blend_rel_gfx_pt_func_cpu(s, m, c, d); | ||
643 | } | ||
644 | |||
645 | static RGBA_Gfx_Pt_Func | ||
646 | op_blend_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst) | ||
647 | { | ||
648 | int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; | ||
649 | |||
650 | if ((col >> 24) < 255) | ||
651 | c = SC; | ||
652 | if (col == ((col >> 24) * 0x01010101)) | ||
653 | c = SC_AA; | ||
654 | if (col == 0xffffffff) | ||
655 | c = SC_N; | ||
656 | if (dst && dst->cache_entry.flags.alpha) | ||
657 | d = DP; | ||
658 | return blend_rel_gfx_pt_func_cpu(s, m, c, d); | ||
659 | } | ||
660 | |||
661 | static RGBA_Gfx_Pt_Func | ||
662 | op_blend_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) | ||
663 | { | ||
664 | int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; | ||
665 | |||
666 | if (src_flags.alpha) | ||
667 | s = SP; | ||
668 | if (dst && dst->cache_entry.flags.alpha) | ||
669 | d = DP; | ||
670 | return blend_rel_gfx_pt_func_cpu(s, m, c, d); | ||
671 | } | ||