Page MenuHomePhabricator

evas_image: fix pixels_dirty_set(False) makes wrong object-change-list.
ClosedPublic

Authored by jypark on Tue, Jan 29, 4:00 AM.

Details

Summary

evas_object_image_pixels_dirty_set(img B, False) means

  1. app want to mark image object's data is not dirty anymore
  2. app don't want to be called get_pixels callback.

that does not mean image need to be redraw.

evas_object_image_pixels_dirty_set(img B, True) means

  1. image object's data is dirty, so image object need to be redraw.
  2. app want to be called get_pixels callback.

but pixels_dirty_set(img B, FALSE) function also set o->changed to true,
it cause problem related with rendering

Below case is the example of problem.

  1. Smart object A
  2. Child image object B
  3. app call pixels_dirty_set(FALSE) inside pixels_get_callback pixels_get_callback is called inside the image object B's rendering.

enlightenment's e_comp_object_render do upper job.

After adding preload fetch,
evas_object_image_render_post can call evas_object_change.

https://phab.enlightenment.org/D7157

evas_render_updates_internal

0. enlightenment call evas_object_image_pixels_dirty_set(img B, TRUE)

o->changed = 1;
evas_object_change(img B)
  1. smart obj A is in render_objects
  2. evas_object_image_render_pre B, o->change=0
  3. evas_render_mapped (Smart A) 3-1. evas_render_mapped (img B) : enlightenment call evas_object_image_pixels_dirty_set(img B, False) : o->changed=1

    3-2. evas_object_change_reset(img B)
  4. pending_change(img B) 4-1. evas_object_image_render_post(img B) o->changed=1 (3-1 step) evas_object_change(img B)->evas_object_change(Smart A)
  1. render_post_reset smart A is chaged(4-1 step), so, called evas_object_change_reset(Smart A) ###smart A is reset(5 step), img B is changed(4-1 step). after this case, img B never get change to be redraw.

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
jypark created this revision.Tue, Jan 29, 4:00 AM
jypark requested review of this revision.Tue, Jan 29, 4:00 AM

I am not sure so much about this change and as it impact enlightenment, maybe @ManMower and @zmike might have a better insight than myself.

I've tried to understand this but I get lost when trying to figure out what happens in evas_object_change() after this patch.

I ran enlightenment for a few minutes and didn't see any discernible difference.

Any way we can get unit tests to prove the validity of this patch?

@jypark Is it possible to make a sample as a unit test to verify the error scenario?

jypark added a comment.EditedTue, Feb 12, 1:12 AM

This issue only occured enlightenment.
Even if it is the same object tree, the problem may or may not occur depending on the order of objects being changed.
Therefore, it is difficult to make a sample or unit test.

in the commit message, new line disappeared.
I write the problem case below again.

0. enlightenment call evas_object_image_pixels_dirty_set(img B, TRUE)

o->changed = 1; 
evas_object_change(img B)
  1. smart obj A is in render_objects
  1. evas_object_image_render_pre B, o->change=0
  1. evas_render_mapped (Smart A)

    3-1. evas_render_mapped (img B) enlightenment call evas_object_image_pixels_dirty_set(img B, False) o->changed=1

    3-2. evas_object_change_reset(img B)
  1. pending_change(img B)

    4-1. evas_object_image_render_post(img B) o->changed=1 (3-1 step) evas_object_change(img B)->evas_object_change(Smart A)
  1. render_post_reset smart A is chaged(4-1 step), so, called evas_object_change_reset(Smart A) ###smart A is reset(5 step), img B is changed(4-1 step). after this case, img B never get change to be redraw.
Hermet accepted this revision.Tue, Feb 12, 6:15 PM

Logically, it's fine to me, let's accept this one unless any side effect is detected.

This revision is now accepted and ready to land.Tue, Feb 12, 6:15 PM
This revision was automatically updated to reflect the committed changes.