summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSubhransu Mohanty <sub.mohanty@samsung.com>2016-05-19 01:36:33 -0700
committerCedric Bail <cedric@osg.samsung.com>2016-05-19 02:23:56 -0700
commit74cee52900fa31d01fc68b4735ccd3185cd89859 (patch)
treee54b72c02d6c600951940d8c9ab7168281b07777
parent3046b8ac4c30c8a6fc27337005056b4e5c678b08 (diff)
evas: fix the ref issue of newly created object in shape_dup() function
Summary: There are couple of issue. By adding the gradient to both parent container as well as to the shape. when we dupe the container it copies twice. Usually we create one gradient and set it to multiple shape , in that case when we call dupe() function it is going to make a separate copy for each of the shape. The patch fixes 1st issue. for 2nd one we need to maybe change the way we implemented dupe function Reviewers: Hermet, cedric Reviewed By: cedric Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D3961 Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
-rw-r--r--src/lib/evas/canvas/evas_vg_shape.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/lib/evas/canvas/evas_vg_shape.c b/src/lib/evas/canvas/evas_vg_shape.c
index 80e4e03b2c..b356b07e52 100644
--- a/src/lib/evas/canvas/evas_vg_shape.c
+++ b/src/lib/evas/canvas/evas_vg_shape.c
@@ -232,22 +232,25 @@ _efl_vg_shape_efl_vg_dup(Eo *obj, Efl_VG_Shape_Data *pd EINA_UNUSED, const Efl_V
232 232
233 if (fromd->fill) 233 if (fromd->fill)
234 { 234 {
235 fill = eo_add(eo_class_get(fromd->fill), parent, efl_vg_dup(eo_self, fromd->fill)); 235 fill = eo_add(eo_class_get(fromd->fill), NULL, efl_vg_dup(eo_self, fromd->fill));
236 efl_vg_shape_fill_set(obj, fill);
237 eo_unref(fill);
236 } 238 }
237 239
238 if (fromd->stroke.fill) 240 if (fromd->stroke.fill)
239 { 241 {
240 stroke_fill = eo_add(eo_class_get(fromd->stroke.fill), parent, efl_vg_dup(eo_self, fromd->stroke.fill)); 242 stroke_fill = eo_add(eo_class_get(fromd->stroke.fill), NULL, efl_vg_dup(eo_self, fromd->stroke.fill));
243 efl_vg_shape_stroke_fill_set(obj, stroke_fill);
244 eo_unref(stroke_fill);
241 } 245 }
242 246
243 if (fromd->stroke.marker) 247 if (fromd->stroke.marker)
244 { 248 {
245 stroke_marker = eo_add(eo_class_get(fromd->stroke.marker), parent, efl_vg_dup(eo_self, fromd->stroke.marker)); 249 stroke_marker = eo_add(eo_class_get(fromd->stroke.marker), NULL, efl_vg_dup(eo_self, fromd->stroke.marker));
250 efl_vg_shape_stroke_marker_set(obj, stroke_marker);
251 eo_unref(stroke_marker);
246 } 252 }
247 253
248 efl_vg_shape_fill_set(obj, fill);
249 efl_vg_shape_stroke_fill_set(obj, stroke_fill);
250 efl_vg_shape_stroke_marker_set(obj, stroke_marker);
251 efl_gfx_shape_dup(obj, from); 254 efl_gfx_shape_dup(obj, from);
252} 255}
253 256