summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinwoo Kim <cinoo.kim@samsung.com>2019-08-14 12:39:36 +0900
committerHermet Park <hermetpark@gmail.com>2019-08-14 12:39:58 +0900
commit85cf0ce88369c3d0e4fffb66b5c0fdbb94688052 (patch)
treeca8f96c22c773f69ef504f06053adcab42a1d10a
parentb8d174738216a8a188aa03eb99cb171aa2f32a7e (diff)
evas_map: draw what map did not draw before.
Summary: When a map property is changed, map draws it. Before drawing, evas_object_map_update updates map->spans which is data for actual drawing. But if changed_map is false, then evas_object_map_update does not update map->spans. Usually mapped object has following step. (1) change map data (evas_map_point_coord_set) (2) render_pre (3) evas_object_map_update updates map->spans if changed_map is true. (4) render (5) render_post -> evas_object_cur_prev -> "map->prev = map->cur" But if mapped object hides at step(1), then step(3),(4) does not happen. But step(4) map->prev keeps changed map data. After this point, If same map data comes, then map does not draw it. Because the new data is same with map->prev. The issue occurs with following step. (A) point_coord_set with point A. (B) (2)(3)(4)(5) works. (C) point_coord_set with point B. And hide. (D) (2)(5) wokrs. (E) point_coord_set with point A. still hide, so none of (2)(3)(4)(5) work. (F) point_coord_set with point B. And show. (G) (2)(3)(4)(5) works. BUT step(3) does not update map->spans because changed_map is false. So you can see image of point A. The changed_map is changed to false after updating map->spans at step(3). So usually changed_map is false before deciding changed_map of next render. In case of not rendering (but render_pre/post) after map data is changed, the changed_map keeps true. So this patch was suppose to make changed_map false if changed_map is already ture before _evas_map_calc_map_geometry decides changed_map which occurs step(1). true changed_map indicates that you need to draw even though new map data is same with previous map data. Test Plan: {F3739770} Reviewers: Hermet, jsuya Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9476
-rw-r--r--src/lib/evas/canvas/evas_map.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/evas_map.c b/src/lib/evas/canvas/evas_map.c
index 19a85d9995..0ac75c7a07 100644
--- a/src/lib/evas/canvas/evas_map.c
+++ b/src/lib/evas/canvas/evas_map.c
@@ -90,7 +90,12 @@ _evas_map_calc_map_geometry(Evas_Object *eo_obj)
90 obj->map->cur.map->normal_geometry.y = yy1; 90 obj->map->cur.map->normal_geometry.y = yy1;
91 obj->map->cur.map->normal_geometry.w = (x2 - x1); 91 obj->map->cur.map->normal_geometry.w = (x2 - x1);
92 obj->map->cur.map->normal_geometry.h = (yy2 - yy1); 92 obj->map->cur.map->normal_geometry.h = (yy2 - yy1);
93 obj->changed_map = ch; 93
94 /* if change_map is true, it means that the prev map data
95 did not render before. even though both prev and cur
96 has same map points we need to draw it */
97 obj->changed_map |= ch;
98
94 // This shouldn't really be needed, but without it we do have case 99 // This shouldn't really be needed, but without it we do have case
95 // where the clip is wrong when a map doesn't change, so always forcing 100 // where the clip is wrong when a map doesn't change, so always forcing
96 // it, as long as someone doesn't find a better fix. 101 // it, as long as someone doesn't find a better fix.