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
This commit is contained in:
Shinwoo Kim 2019-08-14 12:39:36 +09:00 committed by Hermet Park
parent b8d1747382
commit 85cf0ce883
1 changed files with 6 additions and 1 deletions

View File

@ -90,7 +90,12 @@ _evas_map_calc_map_geometry(Evas_Object *eo_obj)
obj->map->cur.map->normal_geometry.y = yy1;
obj->map->cur.map->normal_geometry.w = (x2 - x1);
obj->map->cur.map->normal_geometry.h = (yy2 - yy1);
obj->changed_map = ch;
/* if change_map is true, it means that the prev map data
did not render before. even though both prev and cur
has same map points we need to draw it */
obj->changed_map |= ch;
// This shouldn't really be needed, but without it we do have case
// where the clip is wrong when a map doesn't change, so always forcing
// it, as long as someone doesn't find a better fix.