summaryrefslogtreecommitdiff
path: root/src/lib/ector/software/ector_renderer_software_gradient_linear.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2015-11-17 01:20:22 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-11-19 14:52:10 +0100
commitb2202a50646922134d4ee9dbcc49cd664a395d9b (patch)
tree829ffab957b78cd129f260af81ebb325361673ba /src/lib/ector/software/ector_renderer_software_gradient_linear.c
parent9c3c402fd634d4c4b5fcc61ef48122ea8c2d2f99 (diff)
ector: don't use parent relationship to get access to the surface for freetype backend.
Diffstat (limited to 'src/lib/ector/software/ector_renderer_software_gradient_linear.c')
-rw-r--r--src/lib/ector/software/ector_renderer_software_gradient_linear.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/lib/ector/software/ector_renderer_software_gradient_linear.c b/src/lib/ector/software/ector_renderer_software_gradient_linear.c
index f0ab0c58d9..da596881ca 100644
--- a/src/lib/ector/software/ector_renderer_software_gradient_linear.c
+++ b/src/lib/ector/software/ector_renderer_software_gradient_linear.c
@@ -15,11 +15,10 @@ _ector_renderer_software_gradient_linear_ector_renderer_generic_base_prepare(Eo
15{ 15{
16 if (!pd->surface) 16 if (!pd->surface)
17 { 17 {
18 Eo *parent; 18 Ector_Renderer_Generic_Base_Data *base;
19 19
20 eo_do(obj, parent = eo_parent_get()); 20 base = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_BASE_CLASS);
21 if (!parent) return EINA_FALSE; 21 pd->surface = eo_data_xref(base->surface, ECTOR_SOFTWARE_SURFACE_CLASS, obj);
22 pd->surface = eo_data_xref(parent, ECTOR_SOFTWARE_SURFACE_CLASS, obj);
23 } 22 }
24 23
25 update_color_table(pd); 24 update_color_table(pd);
@@ -63,27 +62,29 @@ _ector_renderer_software_gradient_linear_ector_renderer_software_base_fill(Eo *o
63 return EINA_TRUE; 62 return EINA_TRUE;
64} 63}
65 64
66Eo * 65static Eo *
67_ector_renderer_software_gradient_linear_eo_base_constructor(Eo *obj, 66_ector_renderer_software_gradient_linear_eo_base_constructor(Eo *obj,
68 Ector_Renderer_Software_Gradient_Data *pd) 67 Ector_Renderer_Software_Gradient_Data *pd)
69{ 68{
70 obj = eo_do_super_ret(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS, obj, eo_constructor()); 69 obj = eo_do_super_ret(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS, obj, eo_constructor());
70 if (!obj) return NULL;
71
71 pd->gd = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_GRADIENT_MIXIN, obj); 72 pd->gd = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_GRADIENT_MIXIN, obj);
72 pd->gld = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_GRADIENT_LINEAR_MIXIN, obj); 73 pd->gld = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_GRADIENT_LINEAR_MIXIN, obj);
73 74
74 return obj; 75 return obj;
75} 76}
76 77
77void 78static void
78_ector_renderer_software_gradient_linear_eo_base_destructor(Eo *obj, 79_ector_renderer_software_gradient_linear_eo_base_destructor(Eo *obj,
79 Ector_Renderer_Software_Gradient_Data *pd) 80 Ector_Renderer_Software_Gradient_Data *pd)
80{ 81{
81 Eo *parent; 82 Ector_Renderer_Generic_Base_Data *base;
82 83
83 destroy_color_table(pd); 84 destroy_color_table(pd);
84 85
85 eo_do(obj, parent = eo_parent_get()); 86 base = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_BASE_CLASS);
86 eo_data_xunref(parent, pd->surface, obj); 87 eo_data_xunref(base->surface, pd->surface, obj);
87 88
88 eo_data_xunref(obj, pd->gd, obj); 89 eo_data_xunref(obj, pd->gd, obj);
89 eo_data_xunref(obj, pd->gld, obj); 90 eo_data_xunref(obj, pd->gld, obj);