devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=cf3434a9276546f1b271e42177ada1bb0178a88e

commit cf3434a9276546f1b271e42177ada1bb0178a88e
Author: Derek Foreman <der...@osg.samsung.com>
Date:   Thu Jul 30 11:45:17 2015 -0400

    wayland-shm: Remove curr_buff from Shm_Surface
    
    Summary:
    We already have *current, but we're not using it properly.  Let's throw
    out curr_buff and just use *current.
    
    This temporarily makes swapmode_get do full renders, this will be
    fixed in a future commit that adds proper buffer ages.
    
    Reviewers: zmike, devilhorns
    
    Reviewed By: devilhorns
    
    Subscribers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D2890
---
 src/modules/evas/engines/wayland_shm/evas_engine.h | 1 -
 src/modules/evas/engines/wayland_shm/evas_outbuf.c | 9 +++------
 src/modules/evas/engines/wayland_shm/evas_shm.c    | 3 ++-
 3 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.h 
b/src/modules/evas/engines/wayland_shm/evas_engine.h
index a702155..94779e9 100644
--- a/src/modules/evas/engines/wayland_shm/evas_engine.h
+++ b/src/modules/evas/engines/wayland_shm/evas_engine.h
@@ -79,7 +79,6 @@ struct _Shm_Surface
    int w, h;
    int dx, dy;
    int num_buff;
-   int curr_buff;
 
    Shm_Leaf leaf[MAX_BUFFERS];
    Shm_Leaf *current;
diff --git a/src/modules/evas/engines/wayland_shm/evas_outbuf.c 
b/src/modules/evas/engines/wayland_shm/evas_outbuf.c
index 6fac50e..68bf028 100644
--- a/src/modules/evas/engines/wayland_shm/evas_outbuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_outbuf.c
@@ -251,15 +251,12 @@ _evas_outbuf_flush(Outbuf *ob, Tilebuf_Rect *rects 
EINA_UNUSED, Evas_Render_Mode
 Render_Engine_Swap_Mode 
 _evas_outbuf_swapmode_get(Outbuf *ob)
 {
-   int i = 0, n = 0, count = 0, ret = 0;
+   int count = 0, ret = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   for (; i < ob->surface->num_buff; i++)
-     {
-        n = (ob->surface->num_buff + ob->surface->curr_buff - (i)) % 
ob->surface->num_buff;
-        if (ob->surface->leaf[n].busy) count++;
-     }
+   /* This was broken, for now we just do full redraws */
+   return MODE_FULL;
 
    if (count == ob->surface->num_buff) ret = MODE_FULL;
    else if (count == 0) ret = MODE_COPY;
diff --git a/src/modules/evas/engines/wayland_shm/evas_shm.c 
b/src/modules/evas/engines/wayland_shm/evas_shm.c
index ee01f12..90df693 100644
--- a/src/modules/evas/engines/wayland_shm/evas_shm.c
+++ b/src/modules/evas/engines/wayland_shm/evas_shm.c
@@ -453,7 +453,7 @@ _evas_shm_surface_post(Shm_Surface *surface, Eina_Rectangle 
*rects, unsigned int
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   leaf = &surface->leaf[surface->curr_buff];
+   leaf = surface->current;
    if (!leaf) return;
 
    if (!surface->surface) return;
@@ -478,4 +478,5 @@ _evas_shm_surface_post(Shm_Surface *surface, Eina_Rectangle 
*rects, unsigned int
    wl_surface_commit(surface->surface);
 
    leaf->busy = 1;
+   surface->current = NULL;
 }

-- 


Reply via email to