Track whether a render is in progress or not

We'll need this to protect certain wayland operations.
This commit is contained in:
Derek Foreman 2016-03-04 15:46:14 -06:00 committed by Mike Blumenkrantz
parent d44d334953
commit 71433691da
2 changed files with 7 additions and 0 deletions

View File

@ -155,6 +155,8 @@ struct _E_Comp
Eina_Bool nocomp_want : 1;
Eina_Bool saver : 1;
Eina_Bool shape_queue_blocked : 1;
Eina_Bool rendering : 1; // we've received a pre-render callback but no post-render yet.
};

View File

@ -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)
//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)
{
//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;
Eina_List *l;
e_comp->rendering = EINA_TRUE;
EINA_LIST_FOREACH(e_comp->pre_render_cbs, l, cb)
cb();
}