diff options
Diffstat (limited to 'libraries/evas/src/lib/engines/common/evas_op_add_main_.c')
-rw-r--r-- | libraries/evas/src/lib/engines/common/evas_op_add_main_.c | 541 |
1 files changed, 0 insertions, 541 deletions
diff --git a/libraries/evas/src/lib/engines/common/evas_op_add_main_.c b/libraries/evas/src/lib/engines/common/evas_op_add_main_.c deleted file mode 100644 index ef8b728..0000000 --- a/libraries/evas/src/lib/engines/common/evas_op_add_main_.c +++ /dev/null | |||
@@ -1,541 +0,0 @@ | |||
1 | #include "evas_common.h" | ||
2 | static RGBA_Gfx_Func op_add_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; | ||
3 | static RGBA_Gfx_Pt_Func op_add_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; | ||
4 | |||
5 | static void op_add_init(void); | ||
6 | static void op_add_shutdown(void); | ||
7 | |||
8 | static RGBA_Gfx_Func op_add_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); | ||
9 | static RGBA_Gfx_Func op_add_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); | ||
10 | static RGBA_Gfx_Func op_add_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); | ||
11 | static RGBA_Gfx_Func op_add_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); | ||
12 | static RGBA_Gfx_Func op_add_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); | ||
13 | |||
14 | static RGBA_Gfx_Pt_Func op_add_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); | ||
15 | static RGBA_Gfx_Pt_Func op_add_color_pt_get(DATA32 col, RGBA_Image *dst); | ||
16 | static RGBA_Gfx_Pt_Func op_add_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); | ||
17 | static RGBA_Gfx_Pt_Func op_add_mask_color_pt_get(DATA32 col, RGBA_Image *dst); | ||
18 | static RGBA_Gfx_Pt_Func op_add_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); | ||
19 | |||
20 | static RGBA_Gfx_Compositor _composite_add = { "add", | ||
21 | op_add_init, op_add_shutdown, | ||
22 | op_add_pixel_span_get, op_add_color_span_get, | ||
23 | op_add_pixel_color_span_get, op_add_mask_color_span_get, | ||
24 | op_add_pixel_mask_span_get, | ||
25 | op_add_pixel_pt_get, op_add_color_pt_get, | ||
26 | op_add_pixel_color_pt_get, op_add_mask_color_pt_get, | ||
27 | op_add_pixel_mask_pt_get | ||
28 | }; | ||
29 | |||
30 | RGBA_Gfx_Compositor * | ||
31 | evas_common_gfx_compositor_add_get(void) | ||
32 | { | ||
33 | return &(_composite_add); | ||
34 | } | ||
35 | |||
36 | static RGBA_Gfx_Func op_add_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; | ||
37 | static RGBA_Gfx_Pt_Func op_add_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; | ||
38 | |||
39 | static void op_add_rel_init(void); | ||
40 | static void op_add_rel_shutdown(void); | ||
41 | |||
42 | static RGBA_Gfx_Func op_add_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); | ||
43 | static RGBA_Gfx_Func op_add_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); | ||
44 | static RGBA_Gfx_Func op_add_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); | ||
45 | static RGBA_Gfx_Func op_add_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); | ||
46 | static RGBA_Gfx_Func op_add_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); | ||
47 | |||
48 | static RGBA_Gfx_Pt_Func op_add_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); | ||
49 | static RGBA_Gfx_Pt_Func op_add_rel_color_pt_get(DATA32 col, RGBA_Image *dst); | ||
50 | static RGBA_Gfx_Pt_Func op_add_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); | ||
51 | static RGBA_Gfx_Pt_Func op_add_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst); | ||
52 | static RGBA_Gfx_Pt_Func op_add_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); | ||
53 | |||
54 | static RGBA_Gfx_Compositor _composite_add_rel = { "add_rel", | ||
55 | op_add_rel_init, op_add_rel_shutdown, | ||
56 | op_add_rel_pixel_span_get, op_add_rel_color_span_get, | ||
57 | op_add_rel_pixel_color_span_get, op_add_rel_mask_color_span_get, | ||
58 | op_add_rel_pixel_mask_span_get, | ||
59 | op_add_rel_pixel_pt_get, op_add_rel_color_pt_get, | ||
60 | op_add_rel_pixel_color_pt_get, op_add_rel_mask_color_pt_get, | ||
61 | op_add_rel_pixel_mask_pt_get | ||
62 | }; | ||
63 | |||
64 | RGBA_Gfx_Compositor * | ||
65 | evas_common_gfx_compositor_add_rel_get(void) | ||
66 | { | ||
67 | return &(_composite_add_rel); | ||
68 | } | ||
69 | |||
70 | |||
71 | # include "./evas_op_add/op_add_pixel_.c" | ||
72 | # include "./evas_op_add/op_add_color_.c" | ||
73 | # include "./evas_op_add/op_add_pixel_color_.c" | ||
74 | # include "./evas_op_add/op_add_pixel_mask_.c" | ||
75 | # include "./evas_op_add/op_add_mask_color_.c" | ||
76 | //# include "./evas_op_add/op_add_pixel_mask_color_.c" | ||
77 | |||
78 | # include "./evas_op_add/op_add_pixel_i386.c" | ||
79 | # include "./evas_op_add/op_add_color_i386.c" | ||
80 | # include "./evas_op_add/op_add_pixel_color_i386.c" | ||
81 | # include "./evas_op_add/op_add_pixel_mask_i386.c" | ||
82 | # include "./evas_op_add/op_add_mask_color_i386.c" | ||
83 | //# include "op_add_pixel_mask_color_.c" | ||
84 | |||
85 | static void | ||
86 | op_add_init(void) | ||
87 | { | ||
88 | memset(op_add_span_funcs, 0, sizeof(op_add_span_funcs)); | ||
89 | memset(op_add_pt_funcs, 0, sizeof(op_add_pt_funcs)); | ||
90 | #ifdef BUILD_MMX | ||
91 | init_add_pixel_span_funcs_mmx(); | ||
92 | init_add_pixel_color_span_funcs_mmx(); | ||
93 | init_add_pixel_mask_span_funcs_mmx(); | ||
94 | init_add_color_span_funcs_mmx(); | ||
95 | init_add_mask_color_span_funcs_mmx(); | ||
96 | |||
97 | init_add_pixel_pt_funcs_mmx(); | ||
98 | init_add_pixel_color_pt_funcs_mmx(); | ||
99 | init_add_pixel_mask_pt_funcs_mmx(); | ||
100 | init_add_color_pt_funcs_mmx(); | ||
101 | init_add_mask_color_pt_funcs_mmx(); | ||
102 | #endif | ||
103 | #ifdef BUILD_C | ||
104 | init_add_pixel_span_funcs_c(); | ||
105 | init_add_pixel_color_span_funcs_c(); | ||
106 | init_add_rel_pixel_mask_span_funcs_c(); | ||
107 | init_add_color_span_funcs_c(); | ||
108 | init_add_mask_color_span_funcs_c(); | ||
109 | |||
110 | init_add_pixel_pt_funcs_c(); | ||
111 | init_add_pixel_color_pt_funcs_c(); | ||
112 | init_add_rel_pixel_mask_pt_funcs_c(); | ||
113 | init_add_color_pt_funcs_c(); | ||
114 | init_add_mask_color_pt_funcs_c(); | ||
115 | #endif | ||
116 | } | ||
117 | |||
118 | static void | ||
119 | op_add_shutdown(void) | ||
120 | { | ||
121 | } | ||
122 | |||
123 | static RGBA_Gfx_Func | ||
124 | add_gfx_span_func_cpu(int s, int m, int c, int d) | ||
125 | { | ||
126 | RGBA_Gfx_Func func = NULL; | ||
127 | int cpu = CPU_N; | ||
128 | #ifdef BUILD_MMX | ||
129 | if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) | ||
130 | { | ||
131 | cpu = CPU_MMX; | ||
132 | func = op_add_span_funcs[s][m][c][d][cpu]; | ||
133 | if (func) return func; | ||
134 | } | ||
135 | #endif | ||
136 | #ifdef BUILD_C | ||
137 | cpu = CPU_C; | ||
138 | func = op_add_span_funcs[s][m][c][d][cpu]; | ||
139 | if (func) return func; | ||
140 | #endif | ||
141 | return func; | ||
142 | } | ||
143 | |||
144 | static RGBA_Gfx_Func | ||
145 | op_add_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) | ||
146 | { | ||
147 | int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; | ||
148 | |||
149 | if (src && src->cache_entry.flags.alpha) | ||
150 | s = SP; | ||
151 | if (dst && dst->cache_entry.flags.alpha) | ||
152 | d = DP; | ||
153 | return add_gfx_span_func_cpu(s, m, c, d); | ||
154 | } | ||
155 | |||
156 | static RGBA_Gfx_Func | ||
157 | op_add_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) | ||
158 | { | ||
159 | int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; | ||
160 | |||
161 | if ((col >> 24) < 255) | ||
162 | c = SC; | ||
163 | if (col == (col | 0x00ffffff)) | ||
164 | c = SC_AA; | ||
165 | if (col == 0xffffffff) | ||
166 | c = SC_N; | ||
167 | if (dst && dst->cache_entry.flags.alpha) | ||
168 | d = DP; | ||
169 | return add_gfx_span_func_cpu(s, m, c, d); | ||
170 | } | ||
171 | |||
172 | static RGBA_Gfx_Func | ||
173 | op_add_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) | ||
174 | { | ||
175 | int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; | ||
176 | |||
177 | if (src && src->cache_entry.flags.alpha) | ||
178 | s = SP; | ||
179 | if ((col >> 24) < 255) | ||
180 | c = SC; | ||
181 | if (col == (col | 0x00ffffff)) | ||
182 | c = SC_AA; | ||
183 | if (col == 0xffffffff) | ||
184 | c = SC_N; | ||
185 | if (dst && dst->cache_entry.flags.alpha) | ||
186 | d = DP; | ||
187 | return add_gfx_span_func_cpu(s, m, c, d); | ||
188 | } | ||
189 | |||
190 | static RGBA_Gfx_Func | ||
191 | op_add_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) | ||
192 | { | ||
193 | int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; | ||
194 | |||
195 | if ((col >> 24) < 255) | ||
196 | c = SC; | ||
197 | if (col == (col | 0x00ffffff)) | ||
198 | c = SC_AA; | ||
199 | if (col == 0xffffffff) | ||
200 | c = SC_N; | ||
201 | if (dst && dst->cache_entry.flags.alpha) | ||
202 | d = DP; | ||
203 | return add_gfx_span_func_cpu(s, m, c, d); | ||
204 | } | ||
205 | |||
206 | static RGBA_Gfx_Func | ||
207 | op_add_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) | ||
208 | { | ||
209 | int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; | ||
210 | |||
211 | if (src && src->cache_entry.flags.alpha) | ||
212 | s = SP; | ||
213 | if (dst && dst->cache_entry.flags.alpha) | ||
214 | d = DP; | ||
215 | return add_gfx_span_func_cpu(s, m, c, d); | ||
216 | } | ||
217 | |||
218 | static RGBA_Gfx_Pt_Func | ||
219 | add_gfx_pt_func_cpu(int s, int m, int c, int d) | ||
220 | { | ||
221 | RGBA_Gfx_Pt_Func func = NULL; | ||
222 | int cpu = CPU_N; | ||
223 | #ifdef BUILD_MMX | ||
224 | if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) | ||
225 | { | ||
226 | cpu = CPU_MMX; | ||
227 | func = op_add_pt_funcs[s][m][c][d][cpu]; | ||
228 | if (func) return func; | ||
229 | } | ||
230 | #endif | ||
231 | #ifdef BUILD_C | ||
232 | cpu = CPU_C; | ||
233 | func = op_add_pt_funcs[s][m][c][d][cpu]; | ||
234 | if (func) return func; | ||
235 | #endif | ||
236 | return func; | ||
237 | } | ||
238 | |||
239 | static RGBA_Gfx_Pt_Func | ||
240 | op_add_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) | ||
241 | { | ||
242 | int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; | ||
243 | |||
244 | if (src_flags.alpha) | ||
245 | s = SP; | ||
246 | if (dst && dst->cache_entry.flags.alpha) | ||
247 | d = DP; | ||
248 | return add_gfx_pt_func_cpu(s, m, c, d); | ||
249 | } | ||
250 | |||
251 | static RGBA_Gfx_Pt_Func | ||
252 | op_add_color_pt_get(DATA32 col, RGBA_Image *dst) | ||
253 | { | ||
254 | int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; | ||
255 | |||
256 | if ((col >> 24) < 255) | ||
257 | c = SC; | ||
258 | if (col == (col | 0x00ffffff)) | ||
259 | c = SC_AA; | ||
260 | if (col == 0xffffffff) | ||
261 | c = SC_N; | ||
262 | if (dst && dst->cache_entry.flags.alpha) | ||
263 | d = DP; | ||
264 | return add_gfx_pt_func_cpu(s, m, c, d); | ||
265 | } | ||
266 | |||
267 | static RGBA_Gfx_Pt_Func | ||
268 | op_add_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) | ||
269 | { | ||
270 | int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; | ||
271 | |||
272 | if (src_flags.alpha) | ||
273 | s = SP; | ||
274 | if ((col >> 24) < 255) | ||
275 | c = SC; | ||
276 | if (col == (col | 0x00ffffff)) | ||
277 | c = SC_AA; | ||
278 | if (col == 0xffffffff) | ||
279 | c = SC_N; | ||
280 | if (dst && dst->cache_entry.flags.alpha) | ||
281 | d = DP; | ||
282 | return add_gfx_pt_func_cpu(s, m, c, d); | ||
283 | } | ||
284 | |||
285 | static RGBA_Gfx_Pt_Func | ||
286 | op_add_mask_color_pt_get(DATA32 col, RGBA_Image *dst) | ||
287 | { | ||
288 | int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; | ||
289 | |||
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 | if (dst && dst->cache_entry.flags.alpha) | ||
297 | d = DP; | ||
298 | return add_gfx_pt_func_cpu(s, m, c, d); | ||
299 | } | ||
300 | |||
301 | static RGBA_Gfx_Pt_Func | ||
302 | op_add_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) | ||
303 | { | ||
304 | int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; | ||
305 | |||
306 | if (src_flags.alpha) | ||
307 | s = SP; | ||
308 | if (dst && dst->cache_entry.flags.alpha) | ||
309 | d = DP; | ||
310 | return add_gfx_pt_func_cpu(s, m, c, d); | ||
311 | } | ||
312 | |||
313 | |||
314 | |||
315 | static void | ||
316 | op_add_rel_init(void) | ||
317 | { | ||
318 | memset(op_add_rel_span_funcs, 0, sizeof(op_add_rel_span_funcs)); | ||
319 | memset(op_add_rel_pt_funcs, 0, sizeof(op_add_rel_pt_funcs)); | ||
320 | #ifdef BUILD_MMX | ||
321 | init_add_rel_pixel_span_funcs_mmx(); | ||
322 | init_add_rel_pixel_color_span_funcs_mmx(); | ||
323 | init_add_rel_pixel_mask_span_funcs_mmx(); | ||
324 | init_add_rel_color_span_funcs_mmx(); | ||
325 | init_add_rel_mask_color_span_funcs_mmx(); | ||
326 | |||
327 | init_add_rel_pixel_pt_funcs_mmx(); | ||
328 | init_add_rel_pixel_color_pt_funcs_mmx(); | ||
329 | init_add_rel_pixel_mask_pt_funcs_mmx(); | ||
330 | init_add_rel_color_pt_funcs_mmx(); | ||
331 | init_add_rel_mask_color_pt_funcs_mmx(); | ||
332 | #endif | ||
333 | #ifdef BUILD_C | ||
334 | init_add_rel_pixel_span_funcs_c(); | ||
335 | init_add_rel_pixel_color_span_funcs_c(); | ||
336 | init_add_rel_pixel_mask_span_funcs_c(); | ||
337 | init_add_rel_color_span_funcs_c(); | ||
338 | init_add_rel_mask_color_span_funcs_c(); | ||
339 | |||
340 | init_add_rel_pixel_pt_funcs_c(); | ||
341 | init_add_rel_pixel_color_pt_funcs_c(); | ||
342 | init_add_rel_pixel_mask_pt_funcs_c(); | ||
343 | init_add_rel_color_pt_funcs_c(); | ||
344 | init_add_rel_mask_color_pt_funcs_c(); | ||
345 | #endif | ||
346 | } | ||
347 | |||
348 | static void | ||
349 | op_add_rel_shutdown(void) | ||
350 | { | ||
351 | } | ||
352 | |||
353 | static RGBA_Gfx_Func | ||
354 | add_rel_gfx_span_func_cpu(int s, int m, int c, int d) | ||
355 | { | ||
356 | RGBA_Gfx_Func func = NULL; | ||
357 | int cpu = CPU_N; | ||
358 | #ifdef BUILD_MMX | ||
359 | if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) | ||
360 | { | ||
361 | cpu = CPU_MMX; | ||
362 | func = op_add_rel_span_funcs[s][m][c][d][cpu]; | ||
363 | if (func) return func; | ||
364 | } | ||
365 | #endif | ||
366 | #ifdef BUILD_C | ||
367 | cpu = CPU_C; | ||
368 | func = op_add_rel_span_funcs[s][m][c][d][cpu]; | ||
369 | if (func) return func; | ||
370 | #endif | ||
371 | return func; | ||
372 | } | ||
373 | |||
374 | static RGBA_Gfx_Func | ||
375 | op_add_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) | ||
376 | { | ||
377 | int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; | ||
378 | |||
379 | if (src && src->cache_entry.flags.alpha) | ||
380 | s = SP; | ||
381 | if (dst && dst->cache_entry.flags.alpha) | ||
382 | d = DP; | ||
383 | return add_rel_gfx_span_func_cpu(s, m, c, d); | ||
384 | } | ||
385 | |||
386 | static RGBA_Gfx_Func | ||
387 | op_add_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) | ||
388 | { | ||
389 | int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; | ||
390 | |||
391 | if ((col >> 24) < 255) | ||
392 | c = SC; | ||
393 | if (col == (col | 0x00ffffff)) | ||
394 | c = SC_AA; | ||
395 | if (col == 0xffffffff) | ||
396 | c = SC_N; | ||
397 | if (dst && dst->cache_entry.flags.alpha) | ||
398 | d = DP; | ||
399 | return add_rel_gfx_span_func_cpu(s, m, c, d); | ||
400 | } | ||
401 | |||
402 | static RGBA_Gfx_Func | ||
403 | op_add_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) | ||
404 | { | ||
405 | int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; | ||
406 | |||
407 | if (src && src->cache_entry.flags.alpha) | ||
408 | s = SP; | ||
409 | if ((col >> 24) < 255) | ||
410 | c = SC; | ||
411 | if (col == (col | 0x00ffffff)) | ||
412 | c = SC_AA; | ||
413 | if (col == 0xffffffff) | ||
414 | c = SC_N; | ||
415 | if (dst && dst->cache_entry.flags.alpha) | ||
416 | d = DP; | ||
417 | return add_rel_gfx_span_func_cpu(s, m, c, d); | ||
418 | } | ||
419 | |||
420 | static RGBA_Gfx_Func | ||
421 | op_add_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) | ||
422 | { | ||
423 | int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; | ||
424 | |||
425 | if ((col >> 24) < 255) | ||
426 | c = SC; | ||
427 | if (col == (col | 0x00ffffff)) | ||
428 | c = SC_AA; | ||
429 | if (col == 0xffffffff) | ||
430 | c = SC_N; | ||
431 | if (dst && dst->cache_entry.flags.alpha) | ||
432 | d = DP; | ||
433 | return add_rel_gfx_span_func_cpu(s, m, c, d); | ||
434 | } | ||
435 | |||
436 | static RGBA_Gfx_Func | ||
437 | op_add_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) | ||
438 | { | ||
439 | int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; | ||
440 | |||
441 | if (src && src->cache_entry.flags.alpha) | ||
442 | s = SP; | ||
443 | if (dst && dst->cache_entry.flags.alpha) | ||
444 | d = DP; | ||
445 | return add_rel_gfx_span_func_cpu(s, m, c, d); | ||
446 | } | ||
447 | |||
448 | static RGBA_Gfx_Pt_Func | ||
449 | add_rel_gfx_pt_func_cpu(int s, int m, int c, int d) | ||
450 | { | ||
451 | RGBA_Gfx_Pt_Func func = NULL; | ||
452 | int cpu = CPU_N; | ||
453 | #ifdef BUILD_MMX | ||
454 | if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) | ||
455 | { | ||
456 | cpu = CPU_MMX; | ||
457 | func = op_add_rel_pt_funcs[s][m][c][d][cpu]; | ||
458 | if (func) return func; | ||
459 | } | ||
460 | #endif | ||
461 | #ifdef BUILD_C | ||
462 | cpu = CPU_C; | ||
463 | func = op_add_rel_pt_funcs[s][m][c][d][cpu]; | ||
464 | if (func) return func; | ||
465 | #endif | ||
466 | return func; | ||
467 | } | ||
468 | |||
469 | static RGBA_Gfx_Pt_Func | ||
470 | op_add_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) | ||
471 | { | ||
472 | int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; | ||
473 | |||
474 | if (src_flags.alpha) | ||
475 | s = SP; | ||
476 | if (dst && dst->cache_entry.flags.alpha) | ||
477 | d = DP; | ||
478 | return add_rel_gfx_pt_func_cpu(s, m, c, d); | ||
479 | } | ||
480 | |||
481 | static RGBA_Gfx_Pt_Func | ||
482 | op_add_rel_color_pt_get(DATA32 col, RGBA_Image *dst) | ||
483 | { | ||
484 | int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; | ||
485 | |||
486 | if ((col >> 24) < 255) | ||
487 | c = SC; | ||
488 | if (col == (col | 0x00ffffff)) | ||
489 | c = SC_AA; | ||
490 | if (col == 0xffffffff) | ||
491 | c = SC_N; | ||
492 | if (dst && dst->cache_entry.flags.alpha) | ||
493 | d = DP; | ||
494 | return add_rel_gfx_pt_func_cpu(s, m, c, d); | ||
495 | } | ||
496 | |||
497 | static RGBA_Gfx_Pt_Func | ||
498 | op_add_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) | ||
499 | { | ||
500 | int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; | ||
501 | |||
502 | if (src_flags.alpha) | ||
503 | s = SP; | ||
504 | if ((col >> 24) < 255) | ||
505 | c = SC; | ||
506 | if (col == (col | 0x00ffffff)) | ||
507 | c = SC_AA; | ||
508 | if (col == 0xffffffff) | ||
509 | c = SC_N; | ||
510 | if (dst && dst->cache_entry.flags.alpha) | ||
511 | d = DP; | ||
512 | return add_rel_gfx_pt_func_cpu(s, m, c, d); | ||
513 | } | ||
514 | |||
515 | static RGBA_Gfx_Pt_Func | ||
516 | op_add_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst) | ||
517 | { | ||
518 | int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; | ||
519 | |||
520 | if ((col >> 24) < 255) | ||
521 | c = SC; | ||
522 | if (col == (col | 0x00ffffff)) | ||
523 | c = SC_AA; | ||
524 | if (col == 0xffffffff) | ||
525 | c = SC_N; | ||
526 | if (dst && dst->cache_entry.flags.alpha) | ||
527 | d = DP; | ||
528 | return add_rel_gfx_pt_func_cpu(s, m, c, d); | ||
529 | } | ||
530 | |||
531 | static RGBA_Gfx_Pt_Func | ||
532 | op_add_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) | ||
533 | { | ||
534 | int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; | ||
535 | |||
536 | if (src_flags.alpha) | ||
537 | s = SP; | ||
538 | if (dst && dst->cache_entry.flags.alpha) | ||
539 | d = DP; | ||
540 | return add_rel_gfx_pt_func_cpu(s, m, c, d); | ||
541 | } | ||