summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wl2/ecore_wl2_surface.c
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2018-01-25 16:08:20 -0600
committerDerek Foreman <derekf@osg.samsung.com>2018-01-26 15:53:59 -0600
commite97a8cefe8a7f575c427d9bcadbd245e31c09465 (patch)
treef985d921754874abedea1f0fb57fb2200e0ecf0a /src/lib/ecore_wl2/ecore_wl2_surface.c
parentebcce5aefaef99e843e8324caf863b31f3b653d9 (diff)
ecore_wl2: Add buffer_age_get API and use it in surface code
Diffstat (limited to 'src/lib/ecore_wl2/ecore_wl2_surface.c')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_surface.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_surface.c b/src/lib/ecore_wl2/ecore_wl2_surface.c
index 257f12c2fa..08a62076b5 100644
--- a/src/lib/ecore_wl2/ecore_wl2_surface.c
+++ b/src/lib/ecore_wl2/ecore_wl2_surface.c
@@ -84,14 +84,16 @@ _evas_dmabuf_surface_wait(Ecore_Wl2_Surface *s)
84 Ecore_Wl2_Buffer *b, *best = NULL; 84 Ecore_Wl2_Buffer *b, *best = NULL;
85 Eina_List *l; 85 Eina_List *l;
86 int best_age = -1; 86 int best_age = -1;
87 int age;
87 88
88 EINA_LIST_FOREACH(s->buffers, l, b) 89 EINA_LIST_FOREACH(s->buffers, l, b)
89 { 90 {
90 if (ecore_wl2_buffer_busy_get(b)) continue; 91 if (ecore_wl2_buffer_busy_get(b)) continue;
91 if (b->age > best_age) 92 age = ecore_wl2_buffer_age_get(b);
93 if (age > best_age)
92 { 94 {
93 best = b; 95 best = b;
94 best_age = b->age; 96 best_age = age;
95 } 97 }
96 } 98 }
97 99
@@ -132,7 +134,7 @@ _evas_dmabuf_surface_assign(Ecore_Wl2_Surface *s)
132 EINA_LIST_FOREACH(s->buffers, l, b) 134 EINA_LIST_FOREACH(s->buffers, l, b)
133 b->age++; 135 b->age++;
134 136
135 return s->current->age; 137 return ecore_wl2_buffer_age_get(s->current);
136} 138}
137 139
138static void 140static void