discomfitor pushed a commit to branch enlightenment-0.20.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=71433691da9894fa7d014d13e3379357c9e67249

commit 71433691da9894fa7d014d13e3379357c9e67249
Author: Derek Foreman <der...@osg.samsung.com>
Date:   Fri Mar 4 15:46:14 2016 -0600

    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 d343036..1f4f2d5 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 ac30c05..3045282 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);
@@ -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();
 }

-- 


Reply via email to