Ector: Simplify confusing code

The base class data was already stored, no need to figure it out again
This commit is contained in:
Jean-Philippe Andre 2015-11-20 12:07:01 +09:00
parent a0d3e77e55
commit ec92726ca9
2 changed files with 3 additions and 12 deletions

View File

@ -5,7 +5,7 @@
* one). See stdout/stderr for output.
*
* @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
*/

View File

@ -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
if (!pd->surface)
{
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);
}
pd->surface = eo_data_xref(pd->base->surface, ECTOR_SOFTWARE_SURFACE_CLASS, obj);
return EINA_TRUE;
}
@ -710,8 +705,6 @@ _ector_renderer_software_shape_eo_base_constructor(Eo *obj, Ector_Renderer_Softw
static void
_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.
// call explicit API to free shape data.
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->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(base->surface, pd->surface, obj);
eo_data_xunref(pd->base->surface, pd->surface, obj);
eo_data_xunref(obj, pd->shape, obj);
eo_data_xunref(obj, pd->base, obj);
eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, eo_destructor());