Page MenuHomePhabricator

evas map: calc map geometry when it is out of screen
Needs RevisionPublic

Authored by kimcinoo on Nov 22 2018, 9:23 PM.

Details

Summary

The map geometry(cur.map->normal_geometry) is calculated only if
evas_render_updates_internal_loop calls evas_render_mapped as below.

evas_render_mapped

-> evas_object_map_update
-> evas_object_map_update
-> _evas_map_calc_map_geometry

If the mapped object is not on screen, then evas_render_updates_internal_loop
does not call evas_render_mapped, because the mapped object is not active.

The mapped object is not active(i.e. is_active is 0) always because cache.clip
data including visilbe and geometry is not updated after the object goes out
of screen.

Usually the unmapped object updates its cache.clip data with updated geometry
even though it is out of screen as below.

_efl_canvas_object_efl_gfx_entity_position_set

-> evas_object_map_move_diff_set

So the mapped object geometry(cur.map->normal_geometry) should be updated in
evas_object_map_move_diff_set if it is out of screen.

cf. evas_object_clip_recalc_do is not correct place.
_efl_canvas_object_efl_gfx_entity_position_set

-> evas_object_recalc_clippees
-> evas_object_clip_recalc
-> evas_object_clip_recalc_do
Test Plan

Sample code

Diff Detail

Repository
rEFL core/efl
Branch
evas.map_update.on.the.out.of.screen
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 8241
Build 7525: arc lint + arc unit
kimcinoo created this revision.Nov 22 2018, 9:23 PM
kimcinoo requested review of this revision.Nov 22 2018, 9:23 PM
kimcinoo updated this revision to Diff 17548.Nov 22 2018, 9:26 PM

Update comment

kimcinoo edited the test plan for this revision. (Show Details)Nov 22 2018, 9:28 PM
This revision was not accepted when it landed; it landed in state Needs Review.Nov 26 2018, 6:24 PM
This revision was automatically updated to reflect the committed changes.
Hermet reopened this revision.Nov 26 2018, 6:27 PM
Hermet requested changes to this revision.Nov 26 2018, 7:02 PM
  1. Can't figure out issue in your sample.
  2. If you say, map coordinates weren't updated properly before clip_recalc_do(), we can just update it's coordinates (without checking inactive statement) before that. But it must be updated when we call evas_object_map_set() or evas_object_map_eanble_set()

Need more clue for this issue why clip size is incorrect.

src/lib/evas/canvas/evas_object_main.c
382

These coordinates values must be up to date already.

This revision now requires changes to proceed.Nov 26 2018, 7:02 PM
kimcinoo requested review of this revision.EditedNov 26 2018, 9:29 PM

The sample is using evas_map_util_object_move_sync_set.
evas_object_map_set and evas_object_map_eanble_set are called onces and are not used whenever target object moves.
IMO the commit message would be enough. The geometry is updated only evas_render_mapped
-> evas_object_map_update
-> evas_object_map_update
-> _evas_map_calc_map_geometry is called if evas_map_util_object_move_sync_set is TRUE.

kimcinoo updated this revision to Diff 17627.Nov 26 2018, 9:47 PM

Check obj->map->cur.map->move_sync.enabled before doing everything

kimcinoo updated this revision to Diff 17643.Nov 27 2018, 11:44 PM

Update map geometry on correct place.

kimcinoo updated this revision to Diff 17644.Nov 27 2018, 11:51 PM

Follow naming convention.

kimcinoo edited the summary of this revision. (Show Details)Nov 28 2018, 12:41 AM

@Hermet could you look at this again ? I don't want to step over your review.

Hermet added inline comments.Wed, Apr 3, 9:23 PM
src/lib/evas/canvas/evas_map.c
1427

This check doesn't necessary (move_sync.enabled) since this function would be called only that case so far...

1429

How would u gurantee this clipper is up to updated.

What if,

frame 1:

  1. object_move(obj); -> evas_object_map_move_diff_update();
  1. update clipper region;
  1. RENDER;

frame 2:

My idea is, this is wrong approach, but object must be active if any map property has been changed so that it could be updated properly.

In the main rendering routine, there is a way to check map change condition. The main render could make this objects become active so.

Hermet removed a reviewer: jypark.Wed, Apr 3, 9:24 PM
bu5hm4n requested changes to this revision.EditedSun, Apr 21, 3:06 AM
bu5hm4n added a subscriber: bu5hm4n.

(Requesting changes here for hermet, so its out of the loop.)

This revision now requires changes to proceed.Sun, Apr 21, 3:06 AM

(Requesting changes here for hermet, so its out of the loop.)

What is the meaning of "out of the loop"?

Out of the filter, that displays revisions that need review