derekf pushed a commit to branch master.

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

commit 3775a9645da7e92599babccfe8454304cec367b7
Author: Derek Foreman <[email protected]>
Date:   Fri Jun 30 10:26:41 2017 -0500

    ecore_drm2: fix scanout_on callback firing too often
    
    We need to increase the on scanout count for a buffer only when the
    plane it's on makes its transition from pending to visible.
    
    Previously it was firing for every refresh which would break refcounting
    for any plane using surface that didn't change every frame.
---
 src/lib/ecore_drm2/ecore_drm2_fb.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/lib/ecore_drm2/ecore_drm2_fb.c 
b/src/lib/ecore_drm2/ecore_drm2_fb.c
index d601803f83..f8202fdab3 100644
--- a/src/lib/ecore_drm2/ecore_drm2_fb.c
+++ b/src/lib/ecore_drm2/ecore_drm2_fb.c
@@ -292,6 +292,7 @@ ecore_drm2_fb_flip_complete(Ecore_Drm2_Output *output)
         EINA_LIST_FOREACH_SAFE(output->planes, l, ll, plane)
           {
              fb = plane->fb;
+             plane_scanout = plane->scanout;
              if (!plane->dead)
                {
                   /* First time this plane is scanned out */
@@ -299,13 +300,13 @@ ecore_drm2_fb_flip_complete(Ecore_Drm2_Output *output)
                     fb->scanout_count++;
 
                   plane->scanout = EINA_TRUE;
-                  if (fb->status_handler && (fb->scanout_count == 1))
+                  if (fb->status_handler && (fb->scanout_count == 1) &&
+                      (plane_scanout != plane->scanout))
                     fb->status_handler(fb,
                                        ECORE_DRM2_FB_STATUS_SCANOUT_ON,
                                        fb->status_data);
                   continue;
                }
-             plane_scanout = plane->scanout;
              output->planes = eina_list_remove_list(output->planes, l);
              free(plane);
              if (!plane_scanout) continue;

-- 


Reply via email to