mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2026-01-09 14:19:27 +00:00
Remove GDI canvas
Only spicec was using it - removed by spice server commit: 1876971442ef808b5dcdaa5dc12df617f2179cb5 Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
parent
637621a9b9
commit
a3a2bb9ea7
@ -133,8 +133,6 @@ EXTRA_DIST = \
|
||||
$(SERVER_MARSHALLERS) \
|
||||
canvas_base.c \
|
||||
canvas_base.h \
|
||||
gdi_canvas.c \
|
||||
gdi_canvas.h \
|
||||
lz_compress_tmpl.c \
|
||||
lz_decompress_tmpl.c \
|
||||
quic_family_tmpl.c \
|
||||
|
||||
@ -94,17 +94,6 @@ static inline uint32_t canvas_16bpp_to_32bpp(uint32_t color)
|
||||
|
||||
return ret;
|
||||
}
|
||||
#if defined(WIN32) && defined(GDI_CANVAS)
|
||||
static HDC create_compatible_dc()
|
||||
{
|
||||
HDC dc = CreateCompatibleDC(NULL);
|
||||
|
||||
spice_return_val_if_fail(dc != NULL, NULL);
|
||||
|
||||
return dc;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
typedef struct LzData {
|
||||
LzUsrContext usr;
|
||||
@ -1446,11 +1435,7 @@ static pixman_image_t *canvas_get_bitmap_mask(CanvasBase *canvas, SpiceBitmap* b
|
||||
|
||||
if (invers) {
|
||||
switch (bitmap->format) {
|
||||
#if defined(GDI_CANVAS)
|
||||
case SPICE_BITMAP_FMT_1BIT_BE:
|
||||
#else
|
||||
case SPICE_BITMAP_FMT_1BIT_LE:
|
||||
#endif
|
||||
for (; src_line != end_line; src_line += src_stride, dest_line += dest_stride) {
|
||||
uint8_t *dest = dest_line;
|
||||
uint8_t *now = src_line;
|
||||
@ -1460,11 +1445,7 @@ static pixman_image_t *canvas_get_bitmap_mask(CanvasBase *canvas, SpiceBitmap* b
|
||||
}
|
||||
}
|
||||
break;
|
||||
#if defined(GDI_CANVAS)
|
||||
case SPICE_BITMAP_FMT_1BIT_LE:
|
||||
#else
|
||||
case SPICE_BITMAP_FMT_1BIT_BE:
|
||||
#endif
|
||||
for (; src_line != end_line; src_line += src_stride, dest_line += dest_stride) {
|
||||
uint8_t *dest = dest_line;
|
||||
uint8_t *now = src_line;
|
||||
@ -1483,20 +1464,12 @@ static pixman_image_t *canvas_get_bitmap_mask(CanvasBase *canvas, SpiceBitmap* b
|
||||
}
|
||||
} else {
|
||||
switch (bitmap->format) {
|
||||
#if defined(GDI_CANVAS)
|
||||
case SPICE_BITMAP_FMT_1BIT_BE:
|
||||
#else
|
||||
case SPICE_BITMAP_FMT_1BIT_LE:
|
||||
#endif
|
||||
for (; src_line != end_line; src_line += src_stride, dest_line += dest_stride) {
|
||||
memcpy(dest_line, src_line, line_size);
|
||||
}
|
||||
break;
|
||||
#if defined(GDI_CANVAS)
|
||||
case SPICE_BITMAP_FMT_1BIT_LE:
|
||||
#else
|
||||
case SPICE_BITMAP_FMT_1BIT_BE:
|
||||
#endif
|
||||
for (; src_line != end_line; src_line += src_stride, dest_line += dest_stride) {
|
||||
uint8_t *dest = dest_line;
|
||||
uint8_t *now = src_line;
|
||||
@ -1905,9 +1878,6 @@ static void canvas_base_destroy(CanvasBase *canvas)
|
||||
{
|
||||
quic_destroy(canvas->quic_data.quic);
|
||||
lz_destroy(canvas->lz_data.lz);
|
||||
#ifdef GDI_CANVAS
|
||||
DeleteDC(canvas->dc);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void canvas_clip_pixman(CanvasBase *canvas,
|
||||
@ -3540,12 +3510,5 @@ static int canvas_base_init(CanvasBase *canvas, SpiceCanvasOps *ops,
|
||||
canvas->dc = NULL;
|
||||
#endif
|
||||
|
||||
#ifdef GDI_CANVAS
|
||||
canvas->dc = create_compatible_dc();
|
||||
if (!canvas->dc) {
|
||||
lz_destroy(canvas->lz_data.lz);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
1860
common/gdi_canvas.c
1860
common/gdi_canvas.c
File diff suppressed because it is too large
Load Diff
@ -1,44 +0,0 @@
|
||||
/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
Copyright (C) 2009 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__GDI_CANVAS
|
||||
#define _H__GDI_CANVAS
|
||||
|
||||
#include <stdint.h>
|
||||
#include <spice/macros.h>
|
||||
|
||||
#include "pixman_utils.h"
|
||||
#include "canvas_base.h"
|
||||
#include "region.h"
|
||||
|
||||
SPICE_BEGIN_DECLS
|
||||
|
||||
SpiceCanvas *gdi_canvas_create(int width, int height,
|
||||
HDC dc, class RecurciveMutex *lock, uint32_t format,
|
||||
SpiceImageCache *bits_cache,
|
||||
SpicePaletteCache *palette_cache,
|
||||
SpiceImageSurfaces *surfaces,
|
||||
SpiceGlzDecoder *glz_decoder,
|
||||
SpiceJpegDecoder *jpeg_decoder,
|
||||
SpiceZlibDecoder *zlib_decoder);
|
||||
|
||||
void gdi_canvas_init(void);
|
||||
|
||||
SPICE_END_DECLS
|
||||
|
||||
#endif
|
||||
Loading…
Reference in New Issue
Block a user