mirror of
https://github.com/brl/mutter.git
synced 2025-07-24 02:18:02 +00:00
wayland/x11: Set constraints on the CoglRenderer
When using the Wayland backend this sets a constraint that the CoglRenderer selects the Wayland EGL winsys. When a Wayland compositor display is set it now also sets a constraint that the render should use EGL because only EGL renderers will set up the required wl_drm global object. The X11 backend now sets the X11 constraint. Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
This commit is contained in:
@@ -269,6 +269,12 @@ clutter_backend_real_create_context (ClutterBackend *backend,
|
||||
if (backend->cogl_renderer == NULL)
|
||||
goto error;
|
||||
|
||||
/* If the application is trying to act as a Wayland compositor then
|
||||
it needs to have an EGL-based renderer backend */
|
||||
if (_wayland_compositor_display)
|
||||
cogl_renderer_add_constraint (backend->cogl_renderer,
|
||||
COGL_RENDERER_CONSTRAINT_USES_EGL);
|
||||
|
||||
CLUTTER_NOTE (BACKEND, "Connecting the renderer");
|
||||
if (!cogl_renderer_connect (backend->cogl_renderer, &internal_error))
|
||||
goto error;
|
||||
|
Reference in New Issue
Block a user