Move the struct gl_renderer_interface pointer from the backends into
the weston_renderer structure. The interface struct only contains
function pointers that never change, so make it const.
Load and initialize the GL renderer in libweston instead of in the
backends, using the new weston_compositor_init_renderer() function.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Move this code from headless-backend to a helper library, so it can be
shared with wayland-backend.
gl-renderer.h was missing #pragma once, which made the build fail.
Unfortunately gl-borders needs gl-renderer.h which will attempt to
include EGL headers if gl-renderer is enabled in the build, so we must
get the EGL build flags too, just for the headers.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>