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