summaryrefslogtreecommitdiff
path: root/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2010-08-16 15:14:49 +0000
committerCedric BAIL <cedric.bail@free.fr>2010-08-16 15:14:49 +0000
commit05e8154f8be3cf7dde57d3712088ea0c0d7af4b5 (patch)
treeab177cc1fba7ab494d8bb9d18034b4f69bc998b5 /legacy/evas/src/modules/engines/gl_sdl/evas_engine.c
parentc45c36bd80f229cf84a04b7d7e0146386274c092 (diff)
* evas: remove gradient and gradient2.
SVN revision: 51219
Diffstat (limited to '')
-rw-r--r--legacy/evas/src/modules/engines/gl_sdl/evas_engine.c398
1 files changed, 0 insertions, 398 deletions
diff --git a/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c b/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c
index fc0b1fff49..6942e89b13 100644
--- a/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c
+++ b/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c
@@ -341,363 +341,6 @@ eng_polygon_draw(void *data, void *context, void *surface, void *polygon, int x,
341 evas_gl_common_poly_draw(re->gl_context, polygon, x, y); 341 evas_gl_common_poly_draw(re->gl_context, polygon, x, y);
342} 342}
343 343
344static void
345eng_gradient2_color_np_stop_insert(void *data __UNUSED__, void *gradient __UNUSED__, int r __UNUSED__, int g __UNUSED__, int b __UNUSED__, int a __UNUSED__, float pos __UNUSED__)
346{
347 evas_common_gradient2_color_np_stop_insert(gradient, r, g, b, a, pos);
348}
349
350static void
351eng_gradient2_clear(void *data __UNUSED__, void *gradient __UNUSED__)
352{
353 evas_common_gradient2_clear(gradient);
354}
355
356static void
357eng_gradient2_fill_transform_set(void *data __UNUSED__, void *gradient __UNUSED__, void *transform __UNUSED__)
358{
359 evas_common_gradient2_fill_transform_set(gradient, transform);
360}
361
362static void
363eng_gradient2_fill_spread_set(void *data __UNUSED__, void *gradient __UNUSED__, int spread __UNUSED__)
364{
365 evas_common_gradient2_fill_spread_set(gradient, spread);
366}
367
368static void *
369eng_gradient2_linear_new(void *data __UNUSED__)
370{
371 return evas_common_gradient2_linear_new();
372}
373
374static void
375eng_gradient2_linear_free(void *data __UNUSED__, void *linear_gradient __UNUSED__)
376{
377 evas_common_gradient2_free(linear_gradient);
378}
379
380static void
381eng_gradient2_linear_fill_set(void *data __UNUSED__, void *linear_gradient __UNUSED__, float x0 __UNUSED__, float y0 __UNUSED__, float x1 __UNUSED__, float y1 __UNUSED__)
382{
383 evas_common_gradient2_linear_fill_set(linear_gradient, x0, y0, x1, y1);
384}
385
386static int
387eng_gradient2_linear_is_opaque(void *data __UNUSED__, void *context __UNUSED__, void *linear_gradient __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__)
388{
389 RGBA_Draw_Context *dc = (RGBA_Draw_Context *)context;
390 RGBA_Gradient2 *gr = (RGBA_Gradient2 *)linear_gradient;
391
392 if (!dc || !gr || !gr->type.geometer) return 0;
393 return !(gr->type.geometer->has_alpha(gr, dc->render_op) |
394 gr->type.geometer->has_mask(gr, dc->render_op));
395}
396
397static int
398eng_gradient2_linear_is_visible(void *data __UNUSED__, void *context __UNUSED__, void *linear_gradient __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__)
399{
400 RGBA_Draw_Context *dc = (RGBA_Draw_Context *)context;
401
402 if (!dc || !linear_gradient) return 0;
403 return 1;
404}
405
406static void
407eng_gradient2_linear_render_pre(void *data __UNUSED__, void *context __UNUSED__, void *linear_gradient __UNUSED__)
408{
409 RGBA_Draw_Context *dc = (RGBA_Draw_Context *)context;
410 RGBA_Gradient2 *gr = (RGBA_Gradient2 *)linear_gradient;
411 int len;
412
413 if (!dc || !gr || !gr->type.geometer) return;
414 gr->type.geometer->geom_update(gr);
415 len = gr->type.geometer->get_map_len(gr);
416 evas_common_gradient2_map(dc, gr, len);
417}
418
419static void
420eng_gradient2_linear_render_post(void *data __UNUSED__, void *linear_gradient __UNUSED__)
421{
422}
423
424static void
425eng_gradient2_linear_draw(void *data __UNUSED__, void *context __UNUSED__, void *surface __UNUSED__, void *linear_gradient __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__)
426{
427 Render_Engine *re;
428
429 re = (Render_Engine *)data;
430 re->gl_context->dc = context;
431 {
432 Evas_GL_Image *gim;
433 RGBA_Image *im;
434 RGBA_Draw_Context *dc = context;
435 int op = dc->render_op, cuse = dc->clip.use;
436
437 im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get());
438 im = (RGBA_Image *)evas_cache_image_size_set(&im->cache_entry, w, h);
439
440 dc->render_op = _EVAS_RENDER_FILL;
441 dc->clip.use = 0;
442
443 // draw to buf, copy to tex, draw tex
444 evas_common_gradient2_draw(im, dc, 0, 0, w, h, linear_gradient);
445
446 gim = evas_gl_common_image_new_from_data(re->gl_context, w, h,
447 im->image.data, 1,
448 EVAS_COLORSPACE_ARGB8888);
449 dc->render_op = op;
450 dc->clip.use = cuse;
451 evas_gl_common_image_draw(re->gl_context, gim, 0, 0, w, h, x, y, w, h, 0);
452 evas_cache_image_drop(&im->cache_entry);
453 evas_gl_common_image_free(gim);
454 }
455}
456
457static void *
458eng_gradient2_radial_new(void *data __UNUSED__)
459{
460 return evas_common_gradient2_radial_new();
461}
462
463static void
464eng_gradient2_radial_free(void *data __UNUSED__, void *radial_gradient __UNUSED__)
465{
466 evas_common_gradient2_free(radial_gradient);
467}
468
469static void
470eng_gradient2_radial_fill_set(void *data __UNUSED__, void *radial_gradient __UNUSED__, float cx __UNUSED__, float cy __UNUSED__, float rx __UNUSED__, float ry __UNUSED__)
471{
472 evas_common_gradient2_radial_fill_set(radial_gradient, cx, cy, rx, ry);
473}
474
475static int
476eng_gradient2_radial_is_opaque(void *data __UNUSED__, void *context __UNUSED__, void *radial_gradient __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__)
477{
478 RGBA_Draw_Context *dc = (RGBA_Draw_Context *)context;
479 RGBA_Gradient2 *gr = (RGBA_Gradient2 *)radial_gradient;
480
481 if (!dc || !gr || !gr->type.geometer) return 0;
482 return !(gr->type.geometer->has_alpha(gr, dc->render_op) |
483 gr->type.geometer->has_mask(gr, dc->render_op));
484}
485
486static int
487eng_gradient2_radial_is_visible(void *data __UNUSED__, void *context __UNUSED__, void *radial_gradient __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__)
488{
489 RGBA_Draw_Context *dc = (RGBA_Draw_Context *)context;
490
491 if (!dc || !radial_gradient) return 0;
492 return 1;
493}
494
495static void
496eng_gradient2_radial_render_pre(void *data __UNUSED__, void *context __UNUSED__, void *radial_gradient __UNUSED__)
497{
498 RGBA_Draw_Context *dc = (RGBA_Draw_Context *)context;
499 RGBA_Gradient2 *gr = (RGBA_Gradient2 *)radial_gradient;
500 int len;
501
502 if (!dc || !gr || !gr->type.geometer) return;
503 gr->type.geometer->geom_update(gr);
504 len = gr->type.geometer->get_map_len(gr);
505 evas_common_gradient2_map(dc, gr, len);
506}
507
508static void
509eng_gradient2_radial_render_post(void *data __UNUSED__, void *radial_gradient __UNUSED__)
510{
511}
512
513static void
514eng_gradient2_radial_draw(void *data __UNUSED__, void *context __UNUSED__, void *surface __UNUSED__, void *radial_gradient __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__)
515{
516 Render_Engine *re;
517
518 re = (Render_Engine *)data;
519 re->gl_context->dc = context;
520 {
521 Evas_GL_Image *gim;
522 RGBA_Image *im;
523 RGBA_Draw_Context *dc = context;
524 int op = dc->render_op, cuse = dc->clip.use;
525
526 im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get());
527 im = (RGBA_Image *)evas_cache_image_size_set(&im->cache_entry, w, h);
528
529 dc->render_op = _EVAS_RENDER_FILL;
530 dc->clip.use = 0;
531
532 // draw to buf, copy to tex, draw tex
533 evas_common_gradient2_draw(im, dc, 0, 0, w, h, radial_gradient);
534
535 gim = evas_gl_common_image_new_from_data(re->gl_context, w, h,
536 im->image.data, 1,
537 EVAS_COLORSPACE_ARGB8888);
538 dc->render_op = op;
539 dc->clip.use = cuse;
540 evas_gl_common_image_draw(re->gl_context, gim, 0, 0, w, h, x, y, w, h, 0);
541 evas_cache_image_drop(&im->cache_entry);
542 evas_gl_common_image_free(gim);
543 }
544}
545
546static void *
547eng_gradient_new(void *data __UNUSED__)
548{
549 return evas_common_gradient_new();
550}
551
552static void
553eng_gradient_free(void *data __UNUSED__, void *gradient)
554{
555 evas_common_gradient_free(gradient);
556}
557
558static void
559eng_gradient_color_stop_add(void *data __UNUSED__, void *gradient, int r, int g, int b, int a, int delta)
560{
561 evas_common_gradient_color_stop_add(gradient, r, g, b, a, delta);
562}
563
564static void
565eng_gradient_alpha_stop_add(void *data __UNUSED__, void *gradient, int a, int delta)
566{
567 evas_common_gradient_alpha_stop_add(gradient, a, delta);
568}
569
570static void
571eng_gradient_color_data_set(void *data __UNUSED__, void *gradient, void *map, int len, int has_alpha)
572{
573 evas_common_gradient_color_data_set(gradient, map, len, has_alpha);
574}
575
576static void
577eng_gradient_alpha_data_set(void *data __UNUSED__, void *gradient, void *alpha_map, int len)
578{
579 evas_common_gradient_alpha_data_set(gradient, alpha_map, len);
580}
581
582static void
583eng_gradient_clear(void *data __UNUSED__, void *gradient)
584{
585 evas_common_gradient_clear(gradient);
586}
587
588static void
589eng_gradient_fill_set(void *data __UNUSED__, void *gradient, int x, int y, int w, int h)
590{
591 evas_common_gradient_fill_set(gradient, x, y, w, h);
592}
593
594static void
595eng_gradient_fill_angle_set(void *data __UNUSED__, void *gradient, double angle)
596{
597 evas_common_gradient_fill_angle_set(gradient, angle);
598}
599
600static void
601eng_gradient_fill_spread_set(void *data __UNUSED__, void *gradient, int spread)
602{
603 evas_common_gradient_fill_spread_set(gradient, spread);
604}
605
606static void
607eng_gradient_angle_set(void *data __UNUSED__, void *gradient, double angle)
608{
609 evas_common_gradient_map_angle_set(gradient, angle);
610}
611
612static void
613eng_gradient_offset_set(void *data __UNUSED__, void *gradient, float offset)
614{
615 evas_common_gradient_map_offset_set(gradient, offset);
616}
617
618static void
619eng_gradient_direction_set(void *data __UNUSED__, void *gradient, int direction)
620{
621 evas_common_gradient_map_direction_set(gradient, direction);
622}
623
624static void
625eng_gradient_type_set(void *data __UNUSED__, void *gradient, char *name, char *params)
626{
627 evas_common_gradient_type_set(gradient, name, params);
628}
629
630static int
631eng_gradient_is_opaque(void *data, void *context, void *gradient, int x, int y, int w, int h)
632{
633 RGBA_Draw_Context *dc = (RGBA_Draw_Context *)context;
634 RGBA_Gradient *gr = (RGBA_Gradient *)gradient;
635
636 if (!dc || !gr || !gr->type.geometer) return 0;
637 return !(gr->type.geometer->has_alpha(gr, dc->render_op) |
638 gr->type.geometer->has_mask(gr, dc->render_op));
639}
640
641static int
642eng_gradient_is_visible(void *data, void *context, void *gradient, int x, int y, int w, int h)
643{
644 RGBA_Draw_Context *dc = (RGBA_Draw_Context *)context;
645
646 if (!dc || !gradient) return 0;
647 return 1;
648}
649
650static void
651eng_gradient_render_pre(void *data, void *context, void *gradient)
652{
653 RGBA_Draw_Context *dc = (RGBA_Draw_Context *)context;
654 RGBA_Gradient *gr = (RGBA_Gradient *)gradient;
655 int len;
656
657 if (!dc || !gr || !gr->type.geometer) return;
658 gr->type.geometer->geom_set(gr);
659 len = gr->type.geometer->get_map_len(gr);
660 evas_common_gradient_map(dc, gr, len);
661}
662
663static void
664eng_gradient_render_post(void *data __UNUSED__, void *gradient)
665{
666}
667
668static void
669eng_gradient_draw(void *data, void *context, void *surface __UNUSED__, void *gradient, int x, int y, int w, int h)
670{
671 Render_Engine *re;
672
673 re = (Render_Engine *)data;
674 re->gl_context->dc = context;
675 {
676 Evas_GL_Image *gim;
677 RGBA_Image *im;
678 RGBA_Draw_Context *dc = context;
679 int op = dc->render_op, cuse = dc->clip.use;
680
681 im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get());
682 im = (RGBA_Image *)evas_cache_image_size_set(&im->cache_entry, w, h);
683
684 dc->render_op = _EVAS_RENDER_FILL;
685 dc->clip.use = 0;
686
687 // draw to buf, copy to tex, draw tex
688 evas_common_gradient_draw(im, dc, 0, 0, w, h, gradient);
689
690 gim = evas_gl_common_image_new_from_data(re->gl_context, w, h,
691 im->image.data, 1,
692 EVAS_COLORSPACE_ARGB8888);
693 dc->render_op = op;
694 dc->clip.use = cuse;
695 evas_gl_common_image_draw(re->gl_context, gim, 0, 0, w, h, x, y, w, h, 0);
696 evas_cache_image_drop(&im->cache_entry);
697 evas_gl_common_image_free(gim);
698 }
699}
700
701static int 344static int
702eng_image_alpha_get(void *data, void *image) 345eng_image_alpha_get(void *data, void *image)
703{ 346{
@@ -1248,46 +891,6 @@ module_open(Evas_Module *em)
1248 ORD(polygon_points_clear); 891 ORD(polygon_points_clear);
1249 ORD(polygon_draw); 892 ORD(polygon_draw);
1250 893
1251 ORD(gradient2_color_np_stop_insert);
1252 ORD(gradient2_clear);
1253 ORD(gradient2_fill_transform_set);
1254 ORD(gradient2_fill_spread_set);
1255 ORD(gradient2_linear_new);
1256 ORD(gradient2_linear_free);
1257 ORD(gradient2_linear_fill_set);
1258 ORD(gradient2_linear_is_opaque);
1259 ORD(gradient2_linear_is_visible);
1260 ORD(gradient2_linear_render_pre);
1261 ORD(gradient2_linear_render_post);
1262 ORD(gradient2_linear_draw);
1263 ORD(gradient2_radial_new);
1264 ORD(gradient2_radial_free);
1265 ORD(gradient2_radial_fill_set);
1266 ORD(gradient2_radial_is_opaque);
1267 ORD(gradient2_radial_is_visible);
1268 ORD(gradient2_radial_render_pre);
1269 ORD(gradient2_radial_render_post);
1270 ORD(gradient2_radial_draw);
1271
1272 ORD(gradient_new);
1273 ORD(gradient_free);
1274 ORD(gradient_color_stop_add);
1275 ORD(gradient_alpha_stop_add);
1276 ORD(gradient_color_data_set);
1277 ORD(gradient_alpha_data_set);
1278 ORD(gradient_clear);
1279 ORD(gradient_fill_set);
1280 ORD(gradient_fill_angle_set);
1281 ORD(gradient_fill_spread_set);
1282 ORD(gradient_angle_set);
1283 ORD(gradient_offset_set);
1284 ORD(gradient_direction_set);
1285 ORD(gradient_type_set);
1286 ORD(gradient_is_opaque);
1287 ORD(gradient_is_visible);
1288 ORD(gradient_render_pre);
1289 ORD(gradient_render_post);
1290 ORD(gradient_draw);
1291 ORD(image_load); 894 ORD(image_load);
1292 ORD(image_new_from_data); 895 ORD(image_new_from_data);
1293 ORD(image_new_from_copied_data); 896 ORD(image_new_from_copied_data);
@@ -1364,7 +967,6 @@ _sdl_output_setup (int w, int h, int fullscreen, int noframe)
1364 evas_common_convert_init(); 967 evas_common_convert_init();
1365 evas_common_scale_init(); 968 evas_common_scale_init();
1366 evas_common_rectangle_init(); 969 evas_common_rectangle_init();
1367 evas_common_gradient_init();
1368 evas_common_polygon_init(); 970 evas_common_polygon_init();
1369 evas_common_line_init(); 971 evas_common_line_init();
1370 evas_common_font_init(); 972 evas_common_font_init();