mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-27 07:29:32 +00:00
server: remove OpenGL
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 <fidencio@redhat.com>
This commit is contained in:
parent
1f27043b82
commit
c5c176a5c7
@ -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}
|
||||
|
||||
@ -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 \
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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");
|
||||
};
|
||||
|
||||
@ -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},
|
||||
};
|
||||
|
||||
|
||||
@ -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
|
||||
};
|
||||
|
||||
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#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
|
||||
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#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
|
||||
Loading…
Reference in New Issue
Block a user