evas: Redraw dirty images without updates
authorjiin.moon <jiin.moon@samsung.com>
Tue, 22 Nov 2016 06:36:48 +0000 (15:36 +0900)
committerTaehyub Kim <taehyub.kim@samsung.com>
Wed, 30 Nov 2016 06:38:21 +0000 (15:38 +0900)
Refs: v1.18.0-rc-1592-g55e8842
Author:     Jean-Philippe Andre <jp.andre@samsung.com>
AuthorDate: Mon Nov 21 16:58:29 2016 +0900
Commit:     Jean-Philippe Andre <jp.andre@samsung.com>
CommitDate: Tue Nov 22 14:32:37 2016 +0900

    evas: Redraw dirty images without updates

    The proper way to use the pixel_get callback and dirty flag
    is to also specify which exact region has been updated
    with data_update_add.

    Unfortunately many apps and even GLView are relying on
    invalid behaviour that forced full redraw of the image
    even though data_update_add was never called.

    This amends c1a080f5e4e3ef01cfb792ef3eb9c9e59ba4d3f3

    There is no dirty flag equivalent in EO as there is no
    pixel_get callback defined (yet). One problem is that the GL
    API is not defined, and may prove hard to define for bindings...

Change-Id: I1447c87bb33e7a0fdef2e865d3c7c61f3f1304b8

src/lib/evas/canvas/evas_object_image.c

index a81b744..dba5199 100644 (file)
@@ -3860,19 +3860,12 @@ evas_object_image_render_pre(Evas_Object *eo_obj,
              evas_object_render_pre_prev_cur_add(&e->clip_changes, eo_obj, obj);
              if (!o->pixels->pixel_updates) goto done;
           }
-        if (o->dirty_pixels && ENFN->image_native_get)
+        if (o->dirty_pixels && !o->pixels->pixel_updates)
           {
-             /* Evas GL surfaces have historically required only the dirty
-              * pixel to trigger a redraw (call to pixels_get). Other kinds
-              * of surfaces must add data update regions. */
-             Evas_Native_Surface *ns;
-             ns = ENFN->image_native_get(ENDT, o->engine_data);
-             if (ns && ((ns->type == EVAS_NATIVE_SURFACE_EVASGL) ||
-                        (ns->type == EVAS_NATIVE_SURFACE_TBM)))
-               {
-                  evas_object_render_pre_prev_cur_add(&e->clip_changes, eo_obj, obj);
-                  if (!o->pixels->pixel_updates) goto done;
-               }
+             /* Legacy compatibility (invalid behaviour): dirty_set() used to
+              * trigger full image redraw, even though this was not correct. */
+             evas_object_render_pre_prev_cur_add(&e->clip_changes, eo_obj, obj);
+             goto done;
           }
         if (o->cur->frame != o->prev->frame)
           {