mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-30 17:49:02 +00:00
server: Don't call opengl if not enabled
If USE_OGL is not defined, really don't call or link in the opengl backend.
This commit is contained in:
parent
59152e31f0
commit
7627fba05d
@ -29,14 +29,21 @@ generated_marshallers.c: $(top_srcdir)/spice.proto
|
||||
generated_marshallers.h: $(top_srcdir)/spice.proto
|
||||
$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-marshallers $(STRUCTS) --server -H $(top_srcdir)/spice.proto generated_marshallers.h
|
||||
|
||||
if SUPPORT_GL
|
||||
GL_SRCS = \
|
||||
$(top_srcdir)/common/gl_canvas.c \
|
||||
$(top_srcdir)/common/glc.c \
|
||||
$(top_srcdir)/common/ogl_ctx.c \
|
||||
$(NULL)
|
||||
else
|
||||
GL_SRCS =
|
||||
endif
|
||||
|
||||
COMMON_SRCS = \
|
||||
$(top_srcdir)/common/sw_canvas.c \
|
||||
$(top_srcdir)/common/pixman_utils.c \
|
||||
$(top_srcdir)/common/lines.c \
|
||||
$(top_srcdir)/common/gl_canvas.c \
|
||||
$(top_srcdir)/common/region.c \
|
||||
$(top_srcdir)/common/glc.c \
|
||||
$(top_srcdir)/common/ogl_ctx.c \
|
||||
$(top_srcdir)/common/rop3.c \
|
||||
$(top_srcdir)/common/quic.c \
|
||||
$(top_srcdir)/common/lz.c \
|
||||
@ -111,6 +118,7 @@ libspice_server_la_SOURCES = \
|
||||
zlib_encoder.h \
|
||||
$(TUNNEL_SRCS) \
|
||||
$(COMMON_SRCS) \
|
||||
$(GL_SRCS) \
|
||||
$(NULL)
|
||||
|
||||
libspice_serverincludedir = $(includedir)/spice-server
|
||||
|
||||
@ -133,8 +133,10 @@ typedef struct RendererInfo {
|
||||
|
||||
static RendererInfo renderers_info[] = {
|
||||
{RED_RENDERER_SW, "sw"},
|
||||
#ifdef USE_OGL
|
||||
{RED_RENDERER_OGL_PBUF, "oglpbuf"},
|
||||
{RED_RENDERER_OGL_PIXMAP, "oglpixmap"},
|
||||
#endif
|
||||
{RED_RENDERER_INVALID, NULL},
|
||||
};
|
||||
|
||||
|
||||
@ -9797,6 +9797,7 @@ static void red_migrate_display(RedWorker *worker)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef USE_OGL
|
||||
static SpiceCanvas *create_ogl_context_common(RedWorker *worker, OGLCtx *ctx, uint32_t width,
|
||||
uint32_t height, int32_t stride, uint8_t depth)
|
||||
{
|
||||
@ -9850,6 +9851,7 @@ static SpiceCanvas *create_ogl_pixmap_context(RedWorker *worker, uint32_t width,
|
||||
|
||||
return canvas;
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void *create_canvas_for_surface(RedWorker *worker, RedSurface *surface,
|
||||
uint32_t renderer, uint32_t width, uint32_t height,
|
||||
@ -9867,6 +9869,7 @@ static inline void *create_canvas_for_surface(RedWorker *worker, RedSurface *sur
|
||||
surface->context.top_down = TRUE;
|
||||
surface->context.canvas_draws_on_surface = TRUE;
|
||||
return canvas;
|
||||
#ifdef USE_OGL
|
||||
case RED_RENDERER_OGL_PBUF:
|
||||
canvas = create_ogl_pbuf_context(worker, width, height, stride,
|
||||
SPICE_SURFACE_FMT_DEPTH(format));
|
||||
@ -9877,6 +9880,7 @@ static inline void *create_canvas_for_surface(RedWorker *worker, RedSurface *sur
|
||||
SPICE_SURFACE_FMT_DEPTH(format));
|
||||
surface->context.top_down = FALSE;
|
||||
return canvas;
|
||||
#endif
|
||||
default:
|
||||
red_error("invalid renderer type");
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user