compositor: Move repaint loop into a backend function
We've trimmed down the actual repaint loop to just iterating through the
surface list and calling weston_surface_draw(), so we push that to the
backend without too much code duplication.
diff --git a/src/compositor.c b/src/compositor.c
index 3f178ae..93c76c7 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -555,7 +555,7 @@
return 1;
}
-static void
+WL_EXPORT void
weston_surface_draw(struct weston_surface *es, struct weston_output *output)
{
struct weston_compositor *ec = es->compositor;
@@ -861,8 +861,7 @@
/* We're drawing nothing, just let the damage accumulate */
return;
- wl_list_for_each_reverse(es, &ec->surface_list, link)
- weston_surface_draw(es, output);
+ output->repaint(output);
if (ec->fade.spring.current > 0.001)
solid_surface_release(&solid);