summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-06-30 10:26:41 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-06-30 10:26:41 -0500
commit3775a9645da7e92599babccfe8454304cec367b7 (patch)
tree3687063a6df14cb95a51730f9f2862cf1573fce7
parentd2b614111cea61420cfc4ca0aa938310b9b549f8 (diff)
downloadefl-3775a9645da7e92599babccfe8454304cec367b7.tar.gz
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.
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_fb.c5
1 files 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;