Track whether a render is in progress or not
We'll need this to protect certain wayland operations.
This commit is contained in:
parent
d44d334953
commit
71433691da
|
@ -155,6 +155,8 @@ struct _E_Comp
|
||||||
Eina_Bool nocomp_want : 1;
|
Eina_Bool nocomp_want : 1;
|
||||||
Eina_Bool saver : 1;
|
Eina_Bool saver : 1;
|
||||||
Eina_Bool shape_queue_blocked : 1;
|
Eina_Bool shape_queue_blocked : 1;
|
||||||
|
|
||||||
|
Eina_Bool rendering : 1; // we've received a pre-render callback but no post-render yet.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,9 @@ _e_comp_canvas_render_post(void *data EINA_UNUSED, Evas *e EINA_UNUSED, void *ev
|
||||||
//EINA_LIST_FOREACH(ev->updated_area, l, r)
|
//EINA_LIST_FOREACH(ev->updated_area, l, r)
|
||||||
//INF("POST RENDER: %d,%d %dx%d", r->x, r->y, r->w, r->h);
|
//INF("POST RENDER: %d,%d %dx%d", r->x, r->y, r->w, r->h);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
e_comp->rendering = EINA_FALSE;
|
||||||
|
|
||||||
EINA_LIST_FREE(e_comp->post_updates, ec)
|
EINA_LIST_FREE(e_comp->post_updates, ec)
|
||||||
{
|
{
|
||||||
//INF("POST %p", ec);
|
//INF("POST %p", ec);
|
||||||
|
@ -210,6 +213,8 @@ _e_comp_canvas_prerender(void *data EINA_UNUSED, Evas *e EINA_UNUSED, void *even
|
||||||
E_Comp_Cb cb;
|
E_Comp_Cb cb;
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
|
|
||||||
|
e_comp->rendering = EINA_TRUE;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_comp->pre_render_cbs, l, cb)
|
EINA_LIST_FOREACH(e_comp->pre_render_cbs, l, cb)
|
||||||
cb();
|
cb();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue