mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
Make it possible to build without EGL support
This will avoid building anything related to EGL. For meson, this will mean that both the native backend an the Wayland support must also be disabled.
This commit is contained in:
parent
d48d56f831
commit
bf42b54faa
@ -39,7 +39,9 @@
|
||||
#include <cogl/cogl-error-private.h>
|
||||
#include <cogl/cogl-frame-info-private.h>
|
||||
#include <cogl/cogl-renderer-private.h>
|
||||
#if defined (COGL_HAS_EGL_SUPPORT)
|
||||
#include <cogl/winsys/cogl-winsys-egl-private.h>
|
||||
#endif
|
||||
#include <cogl/winsys/cogl-winsys-private.h>
|
||||
|
||||
void cogl_renderer_set_custom_winsys (CoglRenderer *renderer,
|
||||
|
@ -385,6 +385,7 @@ cogl_wayland_texture_2d_new_from_buffer (CoglContext *ctx,
|
||||
else
|
||||
return tex;
|
||||
}
|
||||
#ifdef COGL_HAS_EGL_SUPPORT
|
||||
else
|
||||
{
|
||||
int format, width, height;
|
||||
@ -439,6 +440,7 @@ cogl_wayland_texture_2d_new_from_buffer (CoglContext *ctx,
|
||||
return tex;
|
||||
}
|
||||
}
|
||||
#endif /* COGL_HAS_EGL_SUPPORT */
|
||||
|
||||
_cogl_set_error (error,
|
||||
COGL_SYSTEM_ERROR,
|
||||
|
@ -576,7 +576,11 @@ _cogl_texture_2d_gl_allocate (CoglTexture *tex,
|
||||
case COGL_TEXTURE_SOURCE_TYPE_GL_FOREIGN:
|
||||
return allocate_from_gl_foreign (tex_2d, loader, error);
|
||||
case COGL_TEXTURE_SOURCE_TYPE_EGL_IMAGE_EXTERNAL:
|
||||
#if defined (COGL_HAS_EGL_SUPPORT)
|
||||
return allocate_custom_egl_image_external (tex_2d, loader, error);
|
||||
#else
|
||||
g_return_val_if_reached (FALSE);
|
||||
#endif
|
||||
}
|
||||
|
||||
g_return_val_if_reached (FALSE);
|
||||
|
@ -45,13 +45,19 @@ G_DEFINE_TYPE (MetaRendererX11, meta_renderer_x11, META_TYPE_RENDERER)
|
||||
static const CoglWinsysVtable *
|
||||
get_x11_cogl_winsys_vtable (CoglRenderer *renderer)
|
||||
{
|
||||
#ifdef COGL_HAS_EGL_PLATFORM_XLIB_SUPPORT
|
||||
if (meta_is_wayland_compositor ())
|
||||
return _cogl_winsys_egl_xlib_get_vtable ();
|
||||
#endif
|
||||
|
||||
switch (renderer->driver)
|
||||
{
|
||||
case COGL_DRIVER_GLES2:
|
||||
#ifdef COGL_HAS_EGL_PLATFORM_XLIB_SUPPORT
|
||||
return _cogl_winsys_egl_xlib_get_vtable ();
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
case COGL_DRIVER_GL:
|
||||
case COGL_DRIVER_GL3:
|
||||
return _cogl_winsys_glx_get_vtable ();
|
||||
|
Loading…
Reference in New Issue
Block a user