From c5c176a5c7718177f23b07981556b5d460627498 Mon Sep 17 00:00:00 2001 From: Marc-AndrĂ© Lureau Date: Wed, 25 Sep 2013 22:21:35 +0200 Subject: server: remove OpenGL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is really not supported, requires X11, so better to remove it for now. Some day it might be revived, using DRM, .. Note for later, this could be removed too (not used by client): - spice-common/common/ogl_ctx Acked-by: Fabiano FidĂȘncio --- configure.ac | 7 ----- server/Makefile.am | 7 ----- server/display-channel.h | 4 --- server/red_dispatcher.c | 6 ----- server/red_worker.c | 69 ------------------------------------------------ server/reds.c | 4 --- server/reds.h | 2 -- server/reds_gl_canvas.c | 26 ------------------ server/reds_gl_canvas.h | 25 ------------------ 9 files changed, 150 deletions(-) delete mode 100644 server/reds_gl_canvas.c delete mode 100644 server/reds_gl_canvas.h diff --git a/configure.ac b/configure.ac index c8cce476..736bc2b9 100644 --- a/configure.ac +++ b/configure.ac @@ -67,12 +67,6 @@ esac dnl ========================================================================= dnl Check optional features -SPICE_CHECK_OPENGL -AS_IF([test x"$enable_opengl" != "xno"], [ - AS_VAR_APPEND([SPICE_NONPKGCONFIG_LIBS], [" $GL_LIBS"]) -]) - - SPICE_CHECK_SMARTCARD AC_ARG_ENABLE([automated_tests], @@ -294,7 +288,6 @@ AC_MSG_NOTICE([ c++ compiler: ${CXX} python: ${PYTHON} - OpenGL: ${enable_opengl} LZ4 support: ${enable_lz4} Smartcard: ${have_smartcard} SASL support: ${enable_sasl} diff --git a/server/Makefile.am b/server/Makefile.am index 669664ab..449d3acd 100644 --- a/server/Makefile.am +++ b/server/Makefile.am @@ -145,13 +145,6 @@ libspice_server_la_SOURCES = \ dcc-encoders.h \ $(NULL) -if HAVE_GL -libspice_server_la_SOURCES += \ - reds_gl_canvas.c \ - reds_gl_canvas.h \ - $(NULL) -endif - if HAVE_SMARTCARD libspice_server_la_SOURCES += \ smartcard.c \ diff --git a/server/display-channel.h b/server/display-channel.h index bad61d1a..531e08f7 100644 --- a/server/display-channel.h +++ b/server/display-channel.h @@ -25,10 +25,6 @@ #include "reds_stream.h" #include "cache-item.h" #include "pixmap-cache.h" -#ifdef USE_OPENGL -#include "common/ogl_ctx.h" -#include "reds_gl_canvas.h" -#endif /* USE_OPENGL */ #include "reds_sw_canvas.h" #include "stat.h" #include "reds.h" diff --git a/server/red_dispatcher.c b/server/red_dispatcher.c index 3845c5a0..d84869a7 100644 --- a/server/red_dispatcher.c +++ b/server/red_dispatcher.c @@ -33,9 +33,6 @@ #include "spice.h" #include "red_worker.h" #include "reds_sw_canvas.h" -#ifdef USE_OPENGL -#include "reds_gl_canvas.h" -#endif // USE_OPENGL #include "reds.h" #include "dispatcher.h" #include "red_parse_qxl.h" @@ -1013,9 +1010,6 @@ void red_dispatcher_init(QXLInstance *qxl) if (g_once_init_enter(&initialized)) { quic_init(); sw_canvas_init(); -#ifdef USE_OPENGL - gl_canvas_init(); -#endif // USE_OPENGL g_once_init_leave(&initialized, TRUE); } diff --git a/server/red_worker.c b/server/red_worker.c index 44627f06..c8f123de 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -4511,63 +4511,6 @@ static void red_migrate_display(DisplayChannel *display, RedChannelClient *rcc) } } -#ifdef USE_OPENGL -static SpiceCanvas *create_ogl_context_common(DisplayChannel *display, OGLCtx *ctx, - uint32_t width, uint32_t height, - int32_t stride, uint8_t depth) -{ - SpiceCanvas *canvas; - - oglctx_make_current(ctx); - if (!(canvas = gl_canvas_create(width, height, depth, &display->image_cache.base, - &display->image_surfaces, NULL, NULL, NULL))) { - return NULL; - } - - spice_canvas_set_usr_data(canvas, ctx, (spice_destroy_fn_t)oglctx_destroy); - - canvas->ops->clear(canvas); - - return canvas; -} - -static SpiceCanvas *create_ogl_pbuf_context(DisplayChannel *display, uint32_t width, - uint32_t height, int32_t stride, uint8_t depth) -{ - OGLCtx *ctx; - SpiceCanvas *canvas; - - if (!(ctx = pbuf_create(width, height))) { - return NULL; - } - - if (!(canvas = create_ogl_context_common(display, ctx, width, height, stride, depth))) { - oglctx_destroy(ctx); - return NULL; - } - - return canvas; -} - -static SpiceCanvas *create_ogl_pixmap_context(DisplayChannel *display, uint32_t width, - uint32_t height, int32_t stride, uint8_t depth) -{ - OGLCtx *ctx; - SpiceCanvas *canvas; - - if (!(ctx = pixmap_create(width, height))) { - return NULL; - } - - if (!(canvas = create_ogl_context_common(display, ctx, width, height, stride, depth))) { - oglctx_destroy(ctx); - return NULL; - } - - return canvas; -} -#endif - static inline void *create_canvas_for_surface(DisplayChannel *display, RedSurface *surface, uint32_t renderer, uint32_t width, uint32_t height, int32_t stride, uint32_t format, void *line_0) @@ -4583,18 +4526,6 @@ static inline void *create_canvas_for_surface(DisplayChannel *display, RedSurfac surface->context.top_down = TRUE; surface->context.canvas_draws_on_surface = TRUE; return canvas; -#ifdef USE_OPENGL - case RED_RENDERER_OGL_PBUF: - canvas = create_ogl_pbuf_context(display, width, height, stride, - SPICE_SURFACE_FMT_DEPTH(format)); - surface->context.top_down = FALSE; - return canvas; - case RED_RENDERER_OGL_PIXMAP: - canvas = create_ogl_pixmap_context(display, width, height, stride, - SPICE_SURFACE_FMT_DEPTH(format)); - surface->context.top_down = FALSE; - return canvas; -#endif default: spice_error("invalid renderer type"); }; diff --git a/server/reds.c b/server/reds.c index 9bd28dff..8b3c3cbf 100644 --- a/server/reds.c +++ b/server/reds.c @@ -3374,10 +3374,6 @@ typedef struct RendererInfo { static RendererInfo renderers_info[] = { {RED_RENDERER_SW, "sw"}, -#ifdef USE_OPENGL - {RED_RENDERER_OGL_PBUF, "oglpbuf"}, - {RED_RENDERER_OGL_PIXMAP, "oglpixmap"}, -#endif {RED_RENDERER_INVALID, NULL}, }; diff --git a/server/reds.h b/server/reds.h index 7937d2d5..fcdc5eb1 100644 --- a/server/reds.h +++ b/server/reds.h @@ -62,8 +62,6 @@ void reds_handle_agent_mouse_event(const VDAgentMouseState *mouse_state); // use enum { RED_RENDERER_INVALID, RED_RENDERER_SW, - RED_RENDERER_OGL_PBUF, - RED_RENDERER_OGL_PIXMAP, RED_RENDERER_LAST }; diff --git a/server/reds_gl_canvas.c b/server/reds_gl_canvas.c deleted file mode 100644 index 66694e76..00000000 --- a/server/reds_gl_canvas.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - Copyright (C) 2011 Red Hat, Inc. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, see . -*/ -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "common/spice_common.h" - -#include "reds_gl_canvas.h" -#define SW_CANVAS_IMAGE_CACHE -#include "common/gl_canvas.c" -#undef SW_CANVAS_IMAGE_CACHE diff --git a/server/reds_gl_canvas.h b/server/reds_gl_canvas.h deleted file mode 100644 index 5d49659d..00000000 --- a/server/reds_gl_canvas.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - Copyright (C) 2011 Red Hat, Inc. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, see . -*/ - -#ifndef _H_REDS_GL_CANVAS -#define _H_REDS_GL_CANVAS - -#define SW_CANVAS_IMAGE_CACHE -#include "common/gl_canvas.h" -#undef SW_CANVAS_IMAGE_CACHE - -#endif -- cgit