summaryrefslogtreecommitdiff
path: root/src/lib/ector/software/ector_renderer_software_shape.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ector/software/ector_renderer_software_shape.c')
-rw-r--r--src/lib/ector/software/ector_renderer_software_shape.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/lib/ector/software/ector_renderer_software_shape.c b/src/lib/ector/software/ector_renderer_software_shape.c
index beaf043..978ccaa 100644
--- a/src/lib/ector/software/ector_renderer_software_shape.c
+++ b/src/lib/ector/software/ector_renderer_software_shape.c
@@ -520,9 +520,8 @@ _update_rle(Eo *obj, Ector_Renderer_Software_Shape_Data *pd)
520 Efl_Gfx_Fill_Rule fill_rule; 520 Efl_Gfx_Fill_Rule fill_rule;
521 Outline *outline, *dash_outline; 521 Outline *outline, *dash_outline;
522 522
523 eo_do(obj, 523 efl_gfx_shape_path_get(obj, &cmds, &pts);
524 efl_gfx_shape_path_get(&cmds, &pts), 524 fill_rule = efl_gfx_shape_fill_rule_get(obj);
525 fill_rule = efl_gfx_shape_fill_rule_get());
526 if (cmds && (_generate_stroke_data(pd) || _generate_shape_data(pd))) 525 if (cmds && (_generate_stroke_data(pd) || _generate_shape_data(pd)))
527 { 526 {
528 outline = _outline_create(); 527 outline = _outline_create();
@@ -577,11 +576,11 @@ _ector_renderer_software_shape_ector_renderer_generic_base_prepare(Eo *obj,
577{ 576{
578 // FIXME: shouldn't that be part of the shape generic implementation ? 577 // FIXME: shouldn't that be part of the shape generic implementation ?
579 if (pd->shape->fill) 578 if (pd->shape->fill)
580 eo_do(pd->shape->fill, ector_renderer_prepare()); 579 ector_renderer_prepare(pd->shape->fill);
581 if (pd->shape->stroke.fill) 580 if (pd->shape->stroke.fill)
582 eo_do(pd->shape->stroke.fill, ector_renderer_prepare()); 581 ector_renderer_prepare(pd->shape->stroke.fill);
583 if (pd->shape->stroke.marker) 582 if (pd->shape->stroke.marker)
584 eo_do(pd->shape->stroke.marker, ector_renderer_prepare()); 583 ector_renderer_prepare(pd->shape->stroke.marker);
585 584
586 // shouldn't that be moved to the software base object 585 // shouldn't that be moved to the software base object
587 if (!pd->surface) 586 if (!pd->surface)
@@ -611,7 +610,7 @@ _ector_renderer_software_shape_ector_renderer_generic_base_draw(Eo *obj,
611 610
612 if (pd->shape->fill) 611 if (pd->shape->fill)
613 { 612 {
614 eo_do(pd->shape->fill, ector_renderer_software_base_fill()); 613 ector_renderer_software_base_fill(pd->shape->fill);
615 ector_software_rasterizer_draw_rle_data(pd->surface->rasterizer, 614 ector_software_rasterizer_draw_rle_data(pd->surface->rasterizer,
616 x, y, mul_col, op, 615 x, y, mul_col, op,
617 pd->shape_data); 616 pd->shape_data);
@@ -633,7 +632,7 @@ _ector_renderer_software_shape_ector_renderer_generic_base_draw(Eo *obj,
633 632
634 if (pd->shape->stroke.fill) 633 if (pd->shape->stroke.fill)
635 { 634 {
636 eo_do(pd->shape->stroke.fill, ector_renderer_software_base_fill()); 635 ector_renderer_software_base_fill(pd->shape->stroke.fill);
637 ector_software_rasterizer_draw_rle_data(pd->surface->rasterizer, 636 ector_software_rasterizer_draw_rle_data(pd->surface->rasterizer,
638 x, y, mul_col, op, 637 x, y, mul_col, op,
639 pd->outline_data); 638 pd->outline_data);
@@ -676,7 +675,7 @@ _ector_renderer_software_shape_efl_gfx_shape_path_set(Eo *obj,
676 pd->shape_data = NULL; 675 pd->shape_data = NULL;
677 pd->outline_data = NULL; 676 pd->outline_data = NULL;
678 677
679 eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, efl_gfx_shape_path_set(op, points)); 678 efl_gfx_shape_path_set(eo_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS), op, points);
680} 679}
681 680
682 681
@@ -697,14 +696,13 @@ _ector_renderer_software_shape_path_changed(void *data, const Eo_Event *event EI
697static Eo * 696static Eo *
698_ector_renderer_software_shape_eo_base_constructor(Eo *obj, Ector_Renderer_Software_Shape_Data *pd) 697_ector_renderer_software_shape_eo_base_constructor(Eo *obj, Ector_Renderer_Software_Shape_Data *pd)
699{ 698{
700 eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, obj = eo_constructor()); 699 obj = eo_constructor(eo_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS));
701 if (!obj) return NULL; 700 if (!obj) return NULL;
702 701
703 pd->public_shape = eo_data_xref(obj, EFL_GFX_SHAPE_MIXIN, obj); 702 pd->public_shape = eo_data_xref(obj, EFL_GFX_SHAPE_MIXIN, obj);
704 pd->shape = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_SHAPE_MIXIN, obj); 703 pd->shape = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_SHAPE_MIXIN, obj);
705 pd->base = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_BASE_CLASS, obj); 704 pd->base = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_BASE_CLASS, obj);
706 eo_do(obj, 705 eo_event_callback_add(obj, EFL_GFX_PATH_CHANGED, _ector_renderer_software_shape_path_changed, pd);
707 eo_event_callback_add(EFL_GFX_PATH_CHANGED, _ector_renderer_software_shape_path_changed, pd));
708 706
709 return obj; 707 return obj;
710} 708}
@@ -714,7 +712,7 @@ _ector_renderer_software_shape_eo_base_destructor(Eo *obj, Ector_Renderer_Softwa
714{ 712{
715 //FIXME, As base class destructor can't call destructor of mixin class. 713 //FIXME, As base class destructor can't call destructor of mixin class.
716 // call explicit API to free shape data. 714 // call explicit API to free shape data.
717 eo_do(obj, efl_gfx_shape_reset()); 715 efl_gfx_shape_reset(obj);
718 716
719 if (pd->shape_data) ector_software_rasterizer_destroy_rle_data(pd->shape_data); 717 if (pd->shape_data) ector_software_rasterizer_destroy_rle_data(pd->shape_data);
720 if (pd->outline_data) ector_software_rasterizer_destroy_rle_data(pd->outline_data); 718 if (pd->outline_data) ector_software_rasterizer_destroy_rle_data(pd->outline_data);
@@ -722,7 +720,7 @@ _ector_renderer_software_shape_eo_base_destructor(Eo *obj, Ector_Renderer_Softwa
722 eo_data_xunref(pd->base->surface, pd->surface, obj); 720 eo_data_xunref(pd->base->surface, pd->surface, obj);
723 eo_data_xunref(obj, pd->shape, obj); 721 eo_data_xunref(obj, pd->shape, obj);
724 eo_data_xunref(obj, pd->base, obj); 722 eo_data_xunref(obj, pd->base, obj);
725 eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, eo_destructor()); 723 eo_destructor(eo_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS));
726} 724}
727 725
728 726
@@ -732,7 +730,7 @@ _ector_renderer_software_shape_ector_renderer_generic_base_crc_get(Eo *obj,
732{ 730{
733 unsigned int crc; 731 unsigned int crc;
734 732
735 eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, crc = ector_renderer_crc_get()); 733 crc = ector_renderer_crc_get(eo_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS));
736 734
737 crc = eina_crc((void*) &pd->shape->stroke.marker, 735 crc = eina_crc((void*) &pd->shape->stroke.marker,
738 sizeof (pd->shape->stroke.marker), 736 sizeof (pd->shape->stroke.marker),