evas render: Gurantee the cache validation of source objects.
authorHermet Park <hermet@hermet.pe.kr>
Fri, 9 Dec 2016 08:02:59 +0000 (17:02 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Mon, 2 Jan 2017 07:24:00 +0000 (16:24 +0900)
This workaround code forcely make few object's state is up to date.
In a rare case, some source objects won't be updated properly.
It seems a rendering context bug or a side effect by a potential context corruption of the smart objects.

Change-Id: If114374adc267476964871bcaf5bebc8fa5e8af1

src/lib/evas/canvas/evas_render.c

index a06ccf8..52224e8 100755 (executable)
@@ -1846,6 +1846,26 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
    return clean_them;
 }
 
+/* TIZEN ONLY(2016/12/09): Gurantee the cache data of proxy source object validation.
+   Don't know in detail but in a rare case, it happens that few object's state is
+   not up to date... */
+static void
+evas_render_gurantee_recalc(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
+{
+   if (obj->cur->clipper) evas_object_clip_recalc(obj);
+   evas_object_change(eo_obj, obj);
+
+   if (obj->is_smart)
+     {
+        Evas_Object_Protected_Data *obj2;
+
+        EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(eo_obj), obj2)
+          {
+             evas_render_gurantee_recalc(obj2->object, obj2);
+          }
+     }
+}
+
 /*
  * Render the source object when a proxy is set.
  * Used to force a draw if necessary, else just makes sure it's available.
@@ -1870,6 +1890,8 @@ evas_render_proxy_subrender(Evas *eo_e, Evas_Object *eo_source, Evas_Object *eo_
    if (!eo_source) return;
    source = eo_data_scope_get(eo_source, EVAS_OBJECT_CLASS);
 
+   evas_render_gurantee_recalc(source->object, source);
+
    w = source->cur->geometry.w;
    h = source->cur->geometry.h;