summaryrefslogtreecommitdiff
path: root/legacy/evas/src/lib/engines/common/evas_draw_main.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2002-11-08 08:02:15 +0000
committerCarsten Haitzler <raster@rasterman.com>2002-11-08 08:02:15 +0000
commit56b5e15f26e16ec835fdcdc7649347f23fb6abf6 (patch)
tree3f86155cee8ee5cec8ae19fcfba6d2625889bff8 /legacy/evas/src/lib/engines/common/evas_draw_main.c
parent5c822574647037eddc7940c1d29702e215c4c832 (diff)
code move
SVN revision: 6445
Diffstat (limited to '')
-rw-r--r--legacy/evas/src/lib/engines/common/evas_draw_main.c782
1 files changed, 782 insertions, 0 deletions
diff --git a/legacy/evas/src/lib/engines/common/evas_draw_main.c b/legacy/evas/src/lib/engines/common/evas_draw_main.c
new file mode 100644
index 0000000000..1d90483fdf
--- /dev/null
+++ b/legacy/evas/src/lib/engines/common/evas_draw_main.c
@@ -0,0 +1,782 @@
1#include "evas_common.h"
2
3void
4draw_init(void)
5{
6}
7
8RGBA_Draw_Context *
9draw_context_new(void)
10{
11 RGBA_Draw_Context *dc;
12
13 dc = calloc(1, sizeof(RGBA_Draw_Context));
14 return dc;
15}
16
17void
18draw_context_free(RGBA_Draw_Context *dc)
19{
20 free(dc);
21}
22
23void
24draw_context_clip_clip(RGBA_Draw_Context *dc, int x, int y, int w, int h)
25{
26 if (dc->clip.use)
27 {
28 RECTS_CLIP_TO_RECT(dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h,
29 x, y, w, h);
30 }
31 else
32 draw_context_set_clip(dc, x, y, w, h);
33}
34
35void
36draw_context_set_clip(RGBA_Draw_Context *dc, int x, int y, int w, int h)
37{
38 dc->clip.use = 1;
39 dc->clip.x = x;
40 dc->clip.y = y;
41 dc->clip.w = w;
42 dc->clip.h = h;
43}
44
45void
46draw_context_unset_clip(RGBA_Draw_Context *dc)
47{
48 dc->clip.use = 0;
49}
50
51void
52draw_context_set_color(RGBA_Draw_Context *dc, int r, int g, int b, int a)
53{
54 R_VAL(&(dc->col.col)) = (DATA8)r;
55 G_VAL(&(dc->col.col)) = (DATA8)g;
56 B_VAL(&(dc->col.col)) = (DATA8)b;
57 A_VAL(&(dc->col.col)) = (DATA8)a;
58}
59
60void
61draw_context_set_multiplier(RGBA_Draw_Context *dc, int r, int g, int b, int a)
62{
63 dc->mul.use = 1;
64 dc->mod.use = 0;
65 R_VAL(&(dc->mul.col)) = (DATA8)r;
66 G_VAL(&(dc->mul.col)) = (DATA8)g;
67 B_VAL(&(dc->mul.col)) = (DATA8)b;
68 A_VAL(&(dc->mul.col)) = (DATA8)a;
69}
70
71void
72draw_context_unset_multiplier(RGBA_Draw_Context *dc)
73{
74 dc->mul.use = 0;
75}
76
77void
78draw_context_set_modifiers(RGBA_Draw_Context *dc, DATA8 *rmod, DATA8 *gmod, DATA8 *bmod, DATA8 *amod)
79{
80 int i;
81
82 dc->mod.use = 1;
83 dc->mul.use = 0;
84 if (rmod) memcpy(dc->mod.r, rmod, sizeof(DATA8) * 256);
85 else
86 {
87 for (i = 0; i < 256; i++) dc->mod.r[i] = (DATA8)i;
88 }
89 if (gmod) memcpy(dc->mod.g, gmod, sizeof(DATA8) * 256);
90 else
91 {
92 for (i = 0; i < 256; i++) dc->mod.g[i] = (DATA8)i;
93 }
94 if (bmod) memcpy(dc->mod.b, bmod, sizeof(DATA8) * 256);
95 else
96 {
97 for (i = 0; i < 256; i++) dc->mod.b[i] = (DATA8)i;
98 }
99 if (amod) memcpy(dc->mod.a, amod, sizeof(DATA8) * 256);
100 else
101 {
102 for (i = 0; i < 256; i++) dc->mod.a[i] = (DATA8)i;
103 }
104}
105
106void
107draw_context_ununset_modifiers(RGBA_Draw_Context *dc)
108{
109 dc->mod.use = 0;
110}
111
112void
113draw_context_add_cutout(RGBA_Draw_Context *dc, int x, int y, int w, int h)
114{
115 Cutout_Rect *r;
116
117 r = calloc(1, sizeof(Cutout_Rect));
118 r->x = x;
119 r->y = y;
120 r->w = w;
121 r->h = h;
122 dc->cutout.rects = evas_object_list_append(dc->cutout.rects, r);
123}
124
125void
126draw_context_clear_cutouts(RGBA_Draw_Context *dc)
127{
128 draw_context_apply_free_cutouts(dc->cutout.rects);
129 dc->cutout.rects = NULL;
130}
131
132Cutout_Rect *
133draw_context_apply_cutouts(RGBA_Draw_Context *dc)
134{
135 Cutout_Rect *r, *rects;
136 Evas_Object_List *l;
137
138 if (!dc->clip.use) return NULL;
139 if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) return NULL;
140 r = calloc(1, sizeof(Cutout_Rect));
141 r->x = dc->clip.x;
142 r->y = dc->clip.y;
143 r->w = dc->clip.w;
144 r->h = dc->clip.h;
145 rects = r;
146 for (l = (Evas_Object_List *)dc->cutout.rects; l; l = l->next)
147 {
148 r = (Cutout_Rect *)l;
149 rects = draw_context_cutouts_split(rects, r);
150 }
151 return rects;
152}
153
154void
155draw_context_apply_free_cutouts(Cutout_Rect *rects)
156{
157 while (rects)
158 {
159 Cutout_Rect *r;
160
161 r = rects;
162 rects = evas_object_list_remove(rects, rects);
163 free(r);
164 }
165}
166
167Cutout_Rect *
168draw_context_cutouts_split(Cutout_Rect *in, Cutout_Rect *split)
169{
170 /* multiple rect in, multiple out */
171 Cutout_Rect *out;
172 Evas_Object_List *l;
173
174 out = NULL;
175 for (l = (Evas_Object_List *)in; l; l = l->next)
176 {
177 Cutout_Rect *r;
178
179 r = (Cutout_Rect *)l;
180 r = draw_context_cutout_split(r, split);
181 while (r)
182 {
183 Cutout_Rect *r2;
184
185 r2 = r;
186 r = evas_object_list_remove(r, r);
187 out = evas_object_list_append(out, r2);
188 }
189 }
190 draw_context_apply_free_cutouts(in);
191 return out;
192}
193
194Cutout_Rect *
195draw_context_cutout_split(Cutout_Rect *in, Cutout_Rect *split)
196{
197 /* 1 input rect, multiple out */
198 Cutout_Rect *out;
199 Cutout_Rect *r;
200
201 /* this is to save me a LOT of typing */
202#define INX1 (in->x)
203#define INX2 (in->x + in->w)
204#define SPX1 (split->x)
205#define SPX2 (split->x + split->w)
206#define INY1 (in->y)
207#define INY2 (in->y + in->h)
208#define SPY1 (split->y)
209#define SPY2 (split->y + split->h)
210#define X1_IN (in->x < split->x)
211#define X2_IN ((in->x + in->w) > (split->x + split->w))
212#define Y1_IN (in->y < split->y)
213#define Y2_IN ((in->y + in->h) > (split->y + split->h))
214#define R_NEW(_r, _x, _y, _w, _h) {(_r) = calloc(1, sizeof(Cutout_Rect)); (_r)->x = (_x); (_r)->y = (_y); (_r)->w = (_w); (_r)->h = (_h);}
215 out = NULL;
216 if (!RECTS_INTERSECT(in->x, in->y, in->w, in->h,
217 split->x, split->y, split->w, split->h))
218 {
219 R_NEW(r, in->x, in->y, in->w, in->h);
220 out = evas_object_list_append(out, r);
221 return out;
222 }
223
224 /* S = split (ie cut out rect) */
225 /* +--+ = in (rect to be cut) */
226
227 /*
228 * +---+
229 * | |
230 * | S |
231 * | |
232 * +---+
233 *
234 */
235 if (X1_IN && X2_IN && Y1_IN && Y2_IN)
236 {
237 R_NEW(r, in->x, in->y, in->w, SPY1 - in->y);
238 out = evas_object_list_append(out, r);
239 R_NEW(r, in->x, SPY1, SPX1 - in->x, SPY2 - SPY1);
240 out = evas_object_list_append(out, r);
241 R_NEW(r, SPX2, SPY1, INX2 - SPX2, SPY2 - SPY1);
242 out = evas_object_list_append(out, r);
243 R_NEW(r, in->x, SPY2, in->w, INY2 - SPY2);
244 out = evas_object_list_append(out, r);
245 return out;
246 }
247 /* SSSSSSS
248 * S+---+S
249 * S|SSS|S
250 * S|SSS|S
251 * S|SSS|S
252 * S+---+S
253 * SSSSSSS
254 */
255 if (!X1_IN && !X2_IN && !Y1_IN && !Y2_IN)
256 {
257 return NULL;
258 }
259 /* SSS
260 * S+---+
261 * S|S |
262 * S|S |
263 * S|S |
264 * S+---+
265 * SSS
266 */
267 if (!X1_IN && X2_IN && !Y1_IN && !Y2_IN)
268 {
269 R_NEW(r, SPX2, in->y, INX2 - SPX2, in->h);
270 out = evas_object_list_append(out, r);
271 return out;
272 }
273 /* S
274 * +---+
275 * | S |
276 * | S |
277 * | S |
278 * +---+
279 * S
280 */
281 if (X1_IN && X2_IN && !Y1_IN && !Y2_IN)
282 {
283 R_NEW(r, in->x, in->y, SPX1 - in->x, in->h);
284 out = evas_object_list_append(out, r);
285 R_NEW(r, SPX2, in->y, INX2 - SPX2, in->h);
286 out = evas_object_list_append(out, r);
287 return out;
288 }
289 /* SSS
290 * +---+S
291 * | S|S
292 * | S|S
293 * | S|S
294 * +---+S
295 * SSS
296 */
297 if (X1_IN && !X2_IN && !Y1_IN && !Y2_IN)
298 {
299 R_NEW(r, in->x, in->y, SPX1 - in->x, in->h);
300 out = evas_object_list_append(out, r);
301 return out;
302 }
303 /* SSSSSSS
304 * S+---+S
305 * S|SSS|S
306 * | |
307 * | |
308 * +---+
309 *
310 */
311 if (!X1_IN && !X2_IN && !Y1_IN && Y2_IN)
312 {
313 R_NEW(r, in->x, SPY2, in->w, INY2 - SPY2);
314 out = evas_object_list_append(out, r);
315 return out;
316 }
317 /*
318 * +---+
319 * | |
320 * S|SSS|S
321 * | |
322 * +---+
323 *
324 */
325 if (!X1_IN && !X2_IN && Y1_IN && Y2_IN)
326 {
327 R_NEW(r, in->x, in->y, in->w, SPY1 - in->y);
328 out = evas_object_list_append(out, r);
329 R_NEW(r, in->x, SPY2, in->w, INY2 - SPY2);
330 out = evas_object_list_append(out, r);
331 return out;
332 }
333 /*
334 * +---+
335 * | |
336 * | |
337 * S|SSS|S
338 * S+---+S
339 * SSSSSSS
340 */
341 if (!X1_IN && !X2_IN && Y1_IN && !Y2_IN)
342 {
343 R_NEW(r, in->x, in->y, in->w, SPY1 - in->y);
344 out = evas_object_list_append(out, r);
345 return out;
346 }
347 /* SSS
348 * S+---+
349 * S|S |
350 * | |
351 * | |
352 * +---+
353 *
354 */
355 if (!X1_IN && X2_IN && !Y1_IN && Y2_IN)
356 {
357 R_NEW(r, SPX2, in->y, INX2 - SPX2, SPY2 - in->y);
358 out = evas_object_list_append(out, r);
359 R_NEW(r, in->x, SPY2, in->w, INY2 - SPY2);
360 out = evas_object_list_append(out, r);
361 return out;
362 }
363 /* S
364 * +---+
365 * | S |
366 * | |
367 * | |
368 * +---+
369 *
370 */
371 if (X1_IN && X2_IN && !Y1_IN && Y2_IN)
372 {
373 R_NEW(r, in->x, in->y, SPX1 - in->x, SPY2 - in->y);
374 out = evas_object_list_append(out, r);
375 R_NEW(r, SPX2, in->y, INX2 - SPX2, SPY2 - in->y);
376 out = evas_object_list_append(out, r);
377 R_NEW(r, in->x, SPY2, in->w, INY2 - SPY2);
378 out = evas_object_list_append(out, r);
379 return out;
380 }
381 /* SSS
382 * +---+S
383 * | S|S
384 * | |
385 * | |
386 * +---+
387 *
388 */
389 if (X1_IN && !X2_IN && !Y1_IN && Y2_IN)
390 {
391 R_NEW(r, in->x, in->y, SPX1 - in->x, SPY2 - in->y);
392 out = evas_object_list_append(out, r);
393 R_NEW(r, in->x, SPY2, in->w, INY2 - SPY2);
394 out = evas_object_list_append(out, r);
395 return out;
396 }
397 /*
398 * +---+
399 * | |
400 * S|S |
401 * | |
402 * +---+
403 *
404 */
405 if (!X1_IN && X2_IN && Y1_IN && Y2_IN)
406 {
407 R_NEW(r, in->x, in->y, in->w, SPY1 - in->y);
408 out = evas_object_list_append(out, r);
409 R_NEW(r, SPX2, SPY1, INX2 - SPX2, SPY2 - SPY1);
410 out = evas_object_list_append(out, r);
411 R_NEW(r, in->x, SPY2, in->w, INY2 - SPY2);
412 out = evas_object_list_append(out, r);
413 return out;
414 }
415 /*
416 * +---+
417 * | |
418 * | S|S
419 * | |
420 * +---+
421 *
422 */
423 if (X1_IN && !X2_IN && Y1_IN && Y2_IN)
424 {
425 R_NEW(r, in->x, in->y, in->w, SPY1 - in->y);
426 out = evas_object_list_append(out, r);
427 R_NEW(r, in->x, SPY1, SPX1 - in->x, SPY2 - SPY1);
428 out = evas_object_list_append(out, r);
429 R_NEW(r, in->x, SPY2, in->w, INY2 - SPY2);
430 out = evas_object_list_append(out, r);
431 return out;
432 }
433 /*
434 * +---+
435 * | |
436 * | |
437 * S|S |
438 * S+---+
439 * SSS
440 */
441 if (!X1_IN && X2_IN && Y1_IN && !Y2_IN)
442 {
443 R_NEW(r, in->x, in->y, in->w, SPY1 - in->y);
444 out = evas_object_list_append(out, r);
445 R_NEW(r, SPX2, SPY1, INX2 - SPX2, INY2 - SPY1);
446 out = evas_object_list_append(out, r);
447 return out;
448 }
449 /*
450 * +---+
451 * | |
452 * | |
453 * | S |
454 * +---+
455 * S
456 */
457 if (X1_IN && X2_IN && Y1_IN && !Y2_IN)
458 {
459 R_NEW(r, in->x, in->y, in->w, SPY1 - in->y);
460 out = evas_object_list_append(out, r);
461 R_NEW(r, in->x, SPY1, SPX1 - in->x, INY2 - SPY1);
462 out = evas_object_list_append(out, r);
463 R_NEW(r, SPX2, SPY1, INX2 - SPX2, INY2 - SPY1);
464 out = evas_object_list_append(out, r);
465 return out;
466 }
467 /*
468 * +---+
469 * | |
470 * | |
471 * | S|S
472 * +---+S
473 * SSS
474 */
475 if (X1_IN && !X2_IN && Y1_IN && !Y2_IN)
476 {
477 R_NEW(r, in->x, in->y, in->w, SPY1 - in->y);
478 out = evas_object_list_append(out, r);
479 R_NEW(r, in->x, SPY1, SPX1 - in->x, INY2 - SPY1);
480 out = evas_object_list_append(out, r);
481 return out;
482 }
483 return NULL;
484}
485
486Gfx_Func_Blend_Src_Dst
487draw_func_blend_get(RGBA_Image *src, RGBA_Image *dst, int pixels)
488{
489#ifdef BUILD_MMX
490 int mmx, sse, sse2;
491
492 cpu_can_do(&mmx, &sse, &sse2);
493#endif
494 if (src->flags & RGBA_IMAGE_HAS_ALPHA)
495 {
496 if (dst->flags & RGBA_IMAGE_HAS_ALPHA)
497 {
498 return blend_pixels_rgba_to_rgba_c;
499 }
500 else
501 {
502#ifdef BUILD_MMX
503# ifdef BUILD_C
504 if (mmx)
505# endif
506 return blend_pixels_rgba_to_rgb_mmx;
507# ifdef BUILD_C
508 else
509# endif
510#endif
511#ifdef BUILD_C
512 return blend_pixels_rgba_to_rgb_c;
513#endif
514 }
515 }
516 else
517 {
518 if (dst->flags & RGBA_IMAGE_HAS_ALPHA)
519 {
520 return copy_pixels_rgb_to_rgba_c;
521 }
522 else
523 {
524#ifdef BUILD_SSE
525 if ((sse) && (pixels > 256 * 256))
526 return copy_pixels_rgba_to_rgba_sse;
527# ifdef BUILD_MMX
528 else
529# endif
530#endif
531#ifdef BUILD_MMX
532# ifdef BUILD_C
533 if (mmx)
534# endif
535 return copy_pixels_rgba_to_rgba_mmx;
536# ifdef BUILD_C
537 else
538# endif
539#endif
540#ifdef BUILD_C
541 return copy_pixels_rgba_to_rgba_c;
542#endif
543 }
544 }
545 return blend_pixels_rgba_to_rgba_c;
546 pixels = 0;
547}
548
549Gfx_Func_Blend_Color_Dst
550draw_func_blend_color_get(DATA32 src, RGBA_Image *dst, int pixels)
551{
552#ifdef BUILD_MMX
553 int mmx, sse, sse2;
554
555 cpu_can_do(&mmx, &sse, &sse2);
556#endif
557 if (A_VAL(&src) != 0xff)
558 {
559 if (dst->flags & RGBA_IMAGE_HAS_ALPHA)
560 {
561 return blend_color_rgba_to_rgba_c;
562 }
563 else
564 {
565#ifdef BUILD_MMX
566 if (mmx)
567 return blend_color_rgba_to_rgb_mmx;
568#endif
569#ifdef BUILD_C
570# ifdef BUILD_MMX
571 else
572# endif
573 return blend_color_rgba_to_rgb_c;
574#endif
575 }
576 }
577 else
578 {
579 if (dst->flags & RGBA_IMAGE_HAS_ALPHA)
580 {
581 return copy_color_rgb_to_rgba_c;
582 }
583 else
584 {
585#ifdef BUILD_SSE
586 if ((sse) && (pixels > 256 * 256))
587 return copy_color_rgba_to_rgba_sse;
588#endif
589#ifdef BUILD_MMX
590# ifdef BUILD_SSE
591 else
592# endif
593 if (mmx)
594 return copy_color_rgba_to_rgba_mmx;
595#endif
596#ifdef BUILD_C
597# ifdef BUILD_MMX
598 else
599# endif
600 return copy_color_rgba_to_rgba_c;
601#endif
602 }
603 }
604 return blend_color_rgba_to_rgba_c;
605 pixels = 0;
606}
607
608Gfx_Func_Blend_Src_Cmod_Dst
609draw_func_blend_cmod_get(RGBA_Image *src, RGBA_Image *dst, int pixels)
610{
611#ifdef BUILD_MMX
612 int mmx, sse, sse2;
613
614 cpu_can_do(&mmx, &sse, &sse2);
615#endif
616 if (src->flags & RGBA_IMAGE_HAS_ALPHA)
617 {
618 if (dst->flags & RGBA_IMAGE_HAS_ALPHA)
619 {
620 return blend_pixels_cmod_rgba_to_rgba_c;
621 }
622 else
623 {
624 return blend_pixels_cmod_rgba_to_rgb_c;
625 }
626 }
627 else
628 {
629 if (dst->flags & RGBA_IMAGE_HAS_ALPHA)
630 {
631 return copy_pixels_cmod_rgb_to_rgba_c;
632 }
633 else
634 {
635 return copy_pixels_cmod_rgba_to_rgba_c;
636 }
637 }
638 return blend_pixels_cmod_rgba_to_rgba_c;
639 pixels = 0;
640}
641
642Gfx_Func_Blend_Src_Mul_Dst
643draw_func_blend_mul_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels)
644{
645#ifdef BUILD_MMX
646 int mmx, sse, sse2;
647
648 cpu_can_do(&mmx, &sse, &sse2);
649#endif
650 if (src->flags & RGBA_IMAGE_HAS_ALPHA)
651 {
652 if (dst->flags & RGBA_IMAGE_HAS_ALPHA)
653 {
654 return blend_pixels_mul_color_rgba_to_rgba_c;
655 }
656 else
657 {
658#ifdef BUILD_MMX
659 if (mmx)
660 return blend_pixels_mul_color_rgba_to_rgb_mmx;
661#endif
662#ifdef BUILD_C
663# ifdef BUILD_MMX
664 else
665# endif
666 return blend_pixels_mul_color_rgba_to_rgb_c;
667#endif
668 }
669 }
670 else
671 {
672 if (dst->flags & RGBA_IMAGE_HAS_ALPHA)
673 {
674 return blend_pixels_mul_color_rgba_to_rgba_c;
675 }
676 else
677 {
678#ifdef BUILD_MMX
679 if (mmx)
680 return blend_pixels_mul_color_rgba_to_rgb_mmx;
681#endif
682#ifdef BUILD_C
683# ifdef BUILD_MMX
684 else
685# endif
686 return blend_pixels_mul_color_rgba_to_rgb_c;
687#endif
688 }
689 }
690 return blend_pixels_mul_color_rgba_to_rgba_c;
691 col = 0;
692 pixels = 0;
693}
694
695Gfx_Func_Blend_Src_Alpha_Mul_Dst
696draw_func_blend_alpha_get(RGBA_Image *dst)
697{
698#ifdef BUILD_MMX
699 int mmx, sse, sse2;
700
701 cpu_can_do(&mmx, &sse, &sse2);
702#endif
703 if (dst->flags & RGBA_IMAGE_HAS_ALPHA)
704 {
705 return blend_alpha_color_rgba_to_rgba_c;
706 }
707 else
708 {
709#ifdef BUILD_MMX
710 if (mmx)
711 return blend_alpha_color_rgba_to_rgb_mmx;
712#endif
713#ifdef BUILD_C
714# ifdef BUILD_MMX
715 else
716# endif
717 return blend_alpha_color_rgba_to_rgb_c;
718#endif
719 }
720#ifdef BUILD_C
721 return blend_alpha_color_rgba_to_rgba_c;
722#else
723 return NULL;
724#endif
725}
726
727Gfx_Func_Blend_Src_Dst
728draw_func_copy_get(int pixels, int reverse)
729{
730#ifdef BUILD_MMX
731 int mmx, sse, sse2;
732
733 cpu_can_do(&mmx, &sse, &sse2);
734#endif
735 if (reverse)
736 {
737#ifdef BUILD_SSE
738 if ((sse) && (pixels > 256 * 256))
739 return copy_pixels_rev_rgba_to_rgba_sse;
740#endif
741#ifdef BUILD_MMX
742# ifdef BUILD_SSE
743 else
744# endif
745 if (mmx)
746 return copy_pixels_rev_rgba_to_rgba_mmx;
747#endif
748#ifdef BUILD_C
749# ifdef BUILD_MMX
750 else
751# endif
752 return copy_pixels_rev_rgba_to_rgba_c;
753#endif
754 }
755 else
756 {
757#ifdef BUILD_SSE
758 if ((sse) && (pixels > 256 * 256))
759 return copy_pixels_rgba_to_rgba_sse;
760#endif
761#ifdef BUILD_MMX
762# ifdef BUILD_SSE
763 else
764# endif
765 if (mmx)
766 return copy_pixels_rgba_to_rgba_mmx;
767#endif
768#ifdef BUILD_C
769# ifdef BUILD_MMX
770 else
771# endif
772 return copy_pixels_rgba_to_rgba_c;
773#endif
774 }
775#ifdef BUILD_C
776 return copy_pixels_rgba_to_rgba_c;
777#else
778 return NULL;
779#endif
780 pixels = 0;
781}
782