forked from enlightenment/efl
Ector: Simplify confusing code
The base class data was already stored, no need to figure it out again
This commit is contained in:
parent
a0d3e77e55
commit
ec92726ca9
|
@ -5,7 +5,7 @@
|
||||||
* one). See stdout/stderr for output.
|
* one). See stdout/stderr for output.
|
||||||
*
|
*
|
||||||
* @verbatim
|
* @verbatim
|
||||||
* gcc -o evas_vg_simple evas-vg-simple.c `pkg-config --libs --cflags evas ecore ecore-evas eina ector eo efl`
|
* gcc -o evas_vg_simple evas-vg-simple.c `pkg-config --libs --cflags evas ecore ecore-evas eina ector eo efl` -lm
|
||||||
* @endverbatim
|
* @endverbatim
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -577,12 +577,7 @@ _ector_renderer_software_shape_ector_renderer_generic_base_prepare(Eo *obj,
|
||||||
|
|
||||||
// shouldn't that be moved to the software base object
|
// shouldn't that be moved to the software base object
|
||||||
if (!pd->surface)
|
if (!pd->surface)
|
||||||
{
|
pd->surface = eo_data_xref(pd->base->surface, ECTOR_SOFTWARE_SURFACE_CLASS, obj);
|
||||||
Ector_Renderer_Generic_Base_Data *base;
|
|
||||||
|
|
||||||
base = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_BASE_CLASS);
|
|
||||||
pd->surface = eo_data_xref(base->surface, ECTOR_SOFTWARE_SURFACE_CLASS, obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
@ -710,8 +705,6 @@ _ector_renderer_software_shape_eo_base_constructor(Eo *obj, Ector_Renderer_Softw
|
||||||
static void
|
static void
|
||||||
_ector_renderer_software_shape_eo_base_destructor(Eo *obj, Ector_Renderer_Software_Shape_Data *pd)
|
_ector_renderer_software_shape_eo_base_destructor(Eo *obj, Ector_Renderer_Software_Shape_Data *pd)
|
||||||
{
|
{
|
||||||
Ector_Renderer_Generic_Base_Data *base;
|
|
||||||
|
|
||||||
//FIXME, As base class destructor can't call destructor of mixin class.
|
//FIXME, As base class destructor can't call destructor of mixin class.
|
||||||
// call explicit API to free shape data.
|
// call explicit API to free shape data.
|
||||||
eo_do(obj, efl_gfx_shape_reset());
|
eo_do(obj, efl_gfx_shape_reset());
|
||||||
|
@ -719,9 +712,7 @@ _ector_renderer_software_shape_eo_base_destructor(Eo *obj, Ector_Renderer_Softwa
|
||||||
if (pd->shape_data) ector_software_rasterizer_destroy_rle_data(pd->shape_data);
|
if (pd->shape_data) ector_software_rasterizer_destroy_rle_data(pd->shape_data);
|
||||||
if (pd->outline_data) ector_software_rasterizer_destroy_rle_data(pd->outline_data);
|
if (pd->outline_data) ector_software_rasterizer_destroy_rle_data(pd->outline_data);
|
||||||
|
|
||||||
base = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_BASE_CLASS);
|
eo_data_xunref(pd->base->surface, pd->surface, obj);
|
||||||
eo_data_xunref(base->surface, pd->surface, obj);
|
|
||||||
|
|
||||||
eo_data_xunref(obj, pd->shape, obj);
|
eo_data_xunref(obj, pd->shape, obj);
|
||||||
eo_data_xunref(obj, pd->base, obj);
|
eo_data_xunref(obj, pd->base, obj);
|
||||||
eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, eo_destructor());
|
eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, eo_destructor());
|
||||||
|
|
Loading…
Reference in New Issue