diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-06-29 18:32:20 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2010-06-29 18:32:20 +0200 |
commit | 7627fba05d150257a3e933d6a9243eeb2cb12aeb (patch) | |
tree | dfa2c6d260113d284cc2d5b9dd9f94c7da963957 /server | |
parent | 59152e31f0d47ecc72d5d8c4690423771bf2ef75 (diff) | |
download | spice-7627fba05d150257a3e933d6a9243eeb2cb12aeb.tar.gz spice-7627fba05d150257a3e933d6a9243eeb2cb12aeb.tar.xz spice-7627fba05d150257a3e933d6a9243eeb2cb12aeb.zip |
server: Don't call opengl if not enabled
If USE_OGL is not defined, really don't call or link in the opengl
backend.
Diffstat (limited to 'server')
-rw-r--r-- | server/Makefile.am | 14 | ||||
-rw-r--r-- | server/red_dispatcher.c | 2 | ||||
-rw-r--r-- | server/red_worker.c | 4 |
3 files changed, 17 insertions, 3 deletions
diff --git a/server/Makefile.am b/server/Makefile.am index a2e4967a..dc3070fe 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 dbc82d4a..715bfb6e 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 8598e7a9..9ff852c7 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"); }; |