From b98e78d46476d8c5468c3034ee13e2dae8c83047 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Fri, 4 Mar 2016 15:46:14 -0600 Subject: [PATCH] Track whether a render is in progress or not We'll need this to protect certain wayland operations. --- src/bin/e_comp.h | 2 ++ src/bin/e_comp_canvas.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/src/bin/e_comp.h b/src/bin/e_comp.h index d34303663..1f4f2d59c 100644 --- a/src/bin/e_comp.h +++ b/src/bin/e_comp.h @@ -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. }; diff --git a/src/bin/e_comp_canvas.c b/src/bin/e_comp_canvas.c index c5cb76d84..2506cd550 100644 --- a/src/bin/e_comp_canvas.c +++ b/src/bin/e_comp_canvas.c @@ -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); @@ -258,6 +261,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(); }