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.c43
1 files changed, 13 insertions, 30 deletions
diff --git a/src/lib/ector/software/ector_renderer_software_shape.c b/src/lib/ector/software/ector_renderer_software_shape.c
index 396e472..b9cf1fa 100644
--- a/src/lib/ector/software/ector_renderer_software_shape.c
+++ b/src/lib/ector/software/ector_renderer_software_shape.c
@@ -734,36 +734,20 @@ _ector_renderer_software_shape_ector_renderer_software_op_fill(Eo *obj EINA_UNUS
734 return EINA_FALSE; 734 return EINA_FALSE;
735} 735}
736 736
737static void 737EOLIAN static void
738_ector_renderer_software_shape_efl_gfx_path_path_set(Eo *obj, 738_ector_renderer_software_shape_efl_gfx_path_commit(Eo *obj EINA_UNUSED,
739 Ector_Renderer_Software_Shape_Data *pd, 739 Ector_Renderer_Software_Shape_Data *pd)
740 const Efl_Gfx_Path_Command *op,
741 const double *points)
742{
743 if (pd->shape_data) ector_software_rasterizer_destroy_rle_data(pd->shape_data);
744 if (pd->outline_data) ector_software_rasterizer_destroy_rle_data(pd->outline_data);
745 pd->shape_data = NULL;
746 pd->outline_data = NULL;
747
748 efl_gfx_path_set(efl_super(obj, MY_CLASS), op, points);
749}
750
751
752static void
753_ector_renderer_software_shape_path_changed(void *data, const Efl_Event *event EINA_UNUSED)
754{ 740{
755 Ector_Renderer_Software_Shape_Data *pd = data; 741 if (pd->shape_data)
756 Efl_Gfx_Path_Change_Event *ev = event->info; 742 {
757 743 ector_software_rasterizer_destroy_rle_data(pd->shape_data);
758 if (ev && !((ev->what & EFL_GFX_CHANGE_FLAG_MATRIX) || 744 pd->shape_data = NULL;
759 (ev->what & EFL_GFX_CHANGE_FLAG_PATH))) 745 }
760 return; 746 if (pd->outline_data)
761 747 {
762 if (pd->shape_data) ector_software_rasterizer_destroy_rle_data(pd->shape_data); 748 ector_software_rasterizer_destroy_rle_data(pd->outline_data);
763 if (pd->outline_data) ector_software_rasterizer_destroy_rle_data(pd->outline_data); 749 pd->outline_data = NULL;
764 750 }
765 pd->shape_data = NULL;
766 pd->outline_data = NULL;
767} 751}
768 752
769static Eo * 753static Eo *
@@ -777,7 +761,6 @@ _ector_renderer_software_shape_efl_object_constructor(Eo *obj, Ector_Renderer_So
777 pd->public_shape = efl_data_xref(obj, EFL_GFX_SHAPE_MIXIN, obj); 761 pd->public_shape = efl_data_xref(obj, EFL_GFX_SHAPE_MIXIN, obj);
778 pd->shape = efl_data_xref(obj, ECTOR_RENDERER_SHAPE_MIXIN, obj); 762 pd->shape = efl_data_xref(obj, ECTOR_RENDERER_SHAPE_MIXIN, obj);
779 pd->base = efl_data_xref(obj, ECTOR_RENDERER_CLASS, obj); 763 pd->base = efl_data_xref(obj, ECTOR_RENDERER_CLASS, obj);
780 efl_event_callback_add(obj, EFL_GFX_PATH_EVENT_CHANGED, _ector_renderer_software_shape_path_changed, pd);
781 764
782 return obj; 765 return obj;
783} 766}