evas: Move group color_set after checking for change
authorJean-Philippe Andre <jp.andre@samsung.com>
Wed, 7 Sep 2016 05:47:33 +0000 (14:47 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Wed, 12 Oct 2016 02:25:55 +0000 (11:25 +0900)
I can't see why the group (smart object) color_set function
was called even if the color hadn't change. Let's test and
see if this breaks anything :)

src/lib/evas/canvas/evas_object_main.c

index b44f4bf..1e61c9a 100644 (file)
@@ -1520,11 +1520,6 @@ _efl_canvas_object_efl_gfx_color_set(Eo *eo_obj, Evas_Object_Protected_Data *obj
 
    evas_object_async_block(obj);
    if (evas_object_intercept_call_color_set(eo_obj, obj, r, g, b, a)) return;
-   if (obj->is_smart)
-     {
-        // FIXME: why is this here, before the state check?
-        efl_canvas_group_color_set(eo_obj, r, g, b, a);
-     }
    if ((obj->cur->color.r == r) &&
        (obj->cur->color.g == g) &&
        (obj->cur->color.b == b) &&
@@ -1540,6 +1535,9 @@ _efl_canvas_object_efl_gfx_color_set(Eo *eo_obj, Evas_Object_Protected_Data *obj
      }
    EINA_COW_STATE_WRITE_END(obj, state_write, cur);
 
+   if (obj->is_smart)
+     efl_canvas_group_color_set(eo_obj, r, g, b, a);
+
    evas_object_clip_dirty(eo_obj, obj);
    if ((prev_a == 0) && (a == 0) && (obj->cur->render_op == EVAS_RENDER_BLEND)) return;