derekf pushed a commit to branch master.

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

commit 2c559a1ee9210b46e4f44346d87ff75e4229740b
Author: Derek Foreman <der...@osg.samsung.com>
Date:   Tue Nov 21 16:48:30 2017 -0600

    wayland_shm: Fix partial redraws
    
    I accidentally the age tracking.
---
 src/modules/evas/engines/wayland_shm/evas_dmabuf.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c 
b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
index 350ec599a8..162240db1b 100644
--- a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
@@ -94,6 +94,8 @@ _evas_dmabuf_surface_wait(Dmabuf_Surface *s)
         Outbuf *ob;
         ob = s->surface->ob;
         best = ecore_wl2_buffer_create(ob->ewd, ob->w, ob->h, s->alpha);
+        /* Start at -1 so it's age is incremented to 0 for first draw */
+        best->age = -1;
         s->buffers = eina_list_append(s->buffers, best);
      }
    return best;
@@ -110,13 +112,18 @@ _evas_dmabuf_surface_assign(Surface *s)
    surface->current = _evas_dmabuf_surface_wait(surface);
    if (!surface->current)
      {
+        /* Should be unreachable and will result in graphical
+         * anomalies - we should probably blow away all the
+         * existing buffers and start over if we actually
+         * see this happen...
+         */
         WRN("No free DMAbuf buffers, dropping a frame");
         EINA_LIST_FOREACH(surface->buffers, l, b)
           b->age = 0;
         return 0;
      }
    EINA_LIST_FOREACH(surface->buffers, l, b)
-     if (b->age) b->age++;
+     b->age++;
 
    return surface->current->age;
 }

-- 


Reply via email to