[Spice-commits] server/Makefile.am server/red_dispatcher.c server/red_worker.c
Alexander Larsson
alexl at kemper.freedesktop.org
Tue Jun 29 09:33:56 PDT 2010
server/Makefile.am | 14 +++++++++++---
server/red_dispatcher.c | 2 ++
server/red_worker.c | 4 ++++
3 files changed, 17 insertions(+), 3 deletions(-)
New commits:
commit 7627fba05d150257a3e933d6a9243eeb2cb12aeb
Author: Alexander Larsson <alexl at redhat.com>
Date: Tue Jun 29 18:32:20 2010 +0200
server: Don't call opengl if not enabled
If USE_OGL is not defined, really don't call or link in the opengl
backend.
diff --git a/server/Makefile.am b/server/Makefile.am
index a2e4967..dc3070f 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -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
diff --git a/server/red_dispatcher.c b/server/red_dispatcher.c
index dbc82d4..715bfb6 100644
--- a/server/red_dispatcher.c
+++ b/server/red_dispatcher.c
@@ -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},
};
diff --git a/server/red_worker.c b/server/red_worker.c
index 8598e7a..9ff852c 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -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");
};
More information about the Spice-commits
mailing list