compositor: Move surface color state to gles2-renderer.
This moves the surface color state into gles2-renderer. To do this it
adds two new weston_renderer functions. create_surface to be able to
create per-surface renderer state, and surface_set_color to set the
color of a surface and changes it to a color surface.
diff --git a/src/noop-renderer.c b/src/noop-renderer.c
index 76f1e8f..b42f26f 100644
--- a/src/noop-renderer.c
+++ b/src/noop-renderer.c
@@ -51,6 +51,18 @@
{
}
+static int
+noop_renderer_create_surface(struct weston_surface *surface)
+{
+ return 0;
+}
+
+static void
+noop_renderer_surface_set_color(struct weston_surface *surface,
+ float red, float green, float blue, float alpha)
+{
+}
+
static void
noop_renderer_destroy_surface(struct weston_surface *surface)
{
@@ -77,6 +89,8 @@
renderer->repaint_output = noop_renderer_repaint_output;
renderer->flush_damage = noop_renderer_flush_damage;
renderer->attach = noop_renderer_attach;
+ renderer->create_surface = noop_renderer_create_surface;
+ renderer->surface_set_color = noop_renderer_surface_set_color;
renderer->destroy_surface = noop_renderer_destroy_surface;
ec->renderer = renderer;