forked from enlightenment/efl
evas image: fix screen flickering issue at partial + image preloading
Summary: Prerequisite: Partial rendering ON + Image Prealoding + Triple surface buffer of GL. Previously, evas trys to draw of an image which didn't prepare of image data yet (in case of preloading) This time, it will draw a solid color onto the dest sufrace 1, But luckily, preloading is finished just after, it draws proper image data onto next surface 2 and 3. Now, triple buffer is filled with the image data but only first frame is still empty. That's a problem. This patch skips to draw image if it doesn't prepare data yet, but once the preloading is finished, it starts to draw images. @fix Reviewers: #committers Subscribers: kimcinoo, cedric, #committers, zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6739
This commit is contained in:
parent
f47c68ce9e
commit
bb984b566b
|
@ -125,7 +125,8 @@ struct _Evas_Image_Data
|
||||||
Eina_Bool filled : 1;
|
Eina_Bool filled : 1;
|
||||||
Eina_Bool filled_set : 1;
|
Eina_Bool filled_set : 1;
|
||||||
Eina_Bool proxyrendering : 1;
|
Eina_Bool proxyrendering : 1;
|
||||||
Eina_Bool preloading : 1;
|
Eina_Bool preloading : 1; //on preloading
|
||||||
|
Eina_Bool preloaded: 1; //just finsihed preloading
|
||||||
Eina_Bool video_surface : 1;
|
Eina_Bool video_surface : 1;
|
||||||
Eina_Bool video_visible : 1;
|
Eina_Bool video_visible : 1;
|
||||||
Eina_Bool created : 1;
|
Eina_Bool created : 1;
|
||||||
|
|
|
@ -1236,7 +1236,10 @@ _evas_image_load_post_update(Evas_Object *eo_obj, Evas_Object_Protected_Data *ob
|
||||||
state_write->image.stride = stride;
|
state_write->image.stride = stride;
|
||||||
}
|
}
|
||||||
EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
|
EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
|
||||||
|
o->changed = EINA_TRUE;
|
||||||
|
o->preloaded = EINA_TRUE;
|
||||||
if (resize_call) evas_object_inform_call_image_resize(eo_obj);
|
if (resize_call) evas_object_inform_call_image_resize(eo_obj);
|
||||||
|
evas_object_change(eo_obj, obj);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2251,6 +2254,9 @@ evas_object_image_render_pre(Evas_Object *eo_obj,
|
||||||
int is_v = 0, was_v = 0;
|
int is_v = 0, was_v = 0;
|
||||||
Eina_Bool changed_prep = EINA_TRUE;
|
Eina_Bool changed_prep = EINA_TRUE;
|
||||||
|
|
||||||
|
/* image is not ready yet, skip rendering. Leave it to next frame */
|
||||||
|
if (o->preloading) return;
|
||||||
|
|
||||||
/* dont pre-render the obj twice! */
|
/* dont pre-render the obj twice! */
|
||||||
if (obj->pre_render_done) return;
|
if (obj->pre_render_done) return;
|
||||||
obj->pre_render_done = EINA_TRUE;
|
obj->pre_render_done = EINA_TRUE;
|
||||||
|
@ -2379,6 +2385,13 @@ evas_object_image_render_pre(Evas_Object *eo_obj,
|
||||||
evas_object_render_pre_prev_cur_add(&e->clip_changes, eo_obj, obj);
|
evas_object_render_pre_prev_cur_add(&e->clip_changes, eo_obj, obj);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
//pre-loading is finished
|
||||||
|
if (o->preloaded)
|
||||||
|
{
|
||||||
|
evas_object_render_pre_prev_cur_add(&e->clip_changes, eo_obj, obj);
|
||||||
|
o->preloaded = EINA_FALSE;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (((obj->cur->geometry.x != obj->prev->geometry.x) ||
|
if (((obj->cur->geometry.x != obj->prev->geometry.x) ||
|
||||||
(obj->cur->geometry.y != obj->prev->geometry.y) ||
|
(obj->cur->geometry.y != obj->prev->geometry.y) ||
|
||||||
|
|
Loading…
Reference in New Issue