compositor: Introduce a weston_renderer object

Move the gles2 render functions to vfuncs on the renderer object.
diff --git a/src/compositor.h b/src/compositor.h
index 37e2d22..763decc 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -267,6 +267,13 @@
 	int32_t x, y;
 };
 
+struct weston_renderer {
+	void (*repaint_output)(struct weston_output *output,
+			       pixman_region32_t *output_damage);
+	void (*flush_damage)(struct weston_surface *surface);
+	void (*attach)(struct weston_surface *es, struct wl_buffer *buffer);
+};
+
 struct weston_compositor {
 	struct wl_shm *shm;
 	struct wl_signal destroy_signal;
@@ -327,6 +334,8 @@
 
 	uint32_t focus;
 
+	struct weston_renderer *renderer;
+
 	PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC
 		image_target_renderbuffer_storage;
 	PFNGLEGLIMAGETARGETTEXTURE2DOESPROC image_target_texture_2d;
@@ -794,12 +803,5 @@
 
 int
 gles2_renderer_init(struct weston_compositor *ec);
-void
-gles2_renderer_repaint_output(struct weston_output *output,
-			      pixman_region32_t *output_damage);
-void
-gles2_renderer_flush_damage(struct weston_surface *surface);
-void
-gles2_renderer_attach(struct weston_surface *es, struct wl_buffer *buffer);
 
 #endif