[Spice-commits] 2 commits - common/canvas_base.c common/canvas_base.h common/sw_canvas.c
Victor Toso de Carvalho
victortoso at kemper.freedesktop.org
Wed Nov 30 14:37:11 UTC 2016
common/canvas_base.c | 33 ---------------------------------
common/canvas_base.h | 3 ---
common/sw_canvas.c | 2 --
3 files changed, 38 deletions(-)
New commits:
commit a5871c80a9286aa28d3228100deb8ec51003bc08
Author: Victor Toso <me at victortoso.com>
Date: Wed Nov 23 12:25:38 2016 +0100
sw-canvas: remove unused defines
Including CANVAS_SINGLE_INSTANCE that was bounded to CanvasBase user
data which was removed in previous commit
Signed-off-by: Victor Toso <victortoso at redhat.com>
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
diff --git a/common/sw_canvas.c b/common/sw_canvas.c
index e8b0f3b..959421f 100644
--- a/common/sw_canvas.c
+++ b/common/sw_canvas.c
@@ -24,8 +24,6 @@
#include <math.h>
#include "sw_canvas.h"
-#define CANVAS_USE_PIXMAN
-#define CANVAS_SINGLE_INSTANCE
#include "canvas_base.c"
#include "rect.h"
#include "region.h"
commit 580ca8153626261ff52759cd31ff6b1e85208a67
Author: Victor Toso <me at victortoso.com>
Date: Wed Nov 23 12:16:40 2016 +0100
canvas-base: remove user data from CanvasBase
Neither Spice nor spice-gtk are using this since the
following commit in Spice "server: remove OpenGL"
c5c176a5c7718177f23b07981556b5d460627498
Signed-off-by: Victor Toso <victortoso at redhat.com>
Acked-by: Pavel Grunt <pgrunt at redhat.com>
diff --git a/common/canvas_base.c b/common/canvas_base.c
index 89c7b43..8f653e0 100644
--- a/common/canvas_base.c
+++ b/common/canvas_base.c
@@ -153,9 +153,6 @@ typedef struct CanvasBase {
GlzData glz_data;
SpiceJpegDecoder* jpeg;
SpiceZlibDecoder* zlib;
-
- void *usr_data;
- spice_destroy_fn_t usr_data_destroy;
} CanvasBase;
typedef enum {
@@ -1909,38 +1906,8 @@ static void canvas_base_destroy(CanvasBase *canvas)
#ifdef GDI_CANVAS
DeleteDC(canvas->dc);
#endif
-
- if (canvas->usr_data && canvas->usr_data_destroy) {
- canvas->usr_data_destroy (canvas->usr_data);
- canvas->usr_data = NULL;
- }
}
-/* This is kind of lame, but it protects against multiple
- instances of these functions. We really should stop including
- canvas_base.c and build it separately instead */
-#ifdef CANVAS_SINGLE_INSTANCE
-
-void spice_canvas_set_usr_data(SpiceCanvas *spice_canvas,
- void *data,
- spice_destroy_fn_t destroy_fn)
-{
- CanvasBase *canvas = (CanvasBase *)spice_canvas;
- if (canvas->usr_data && canvas->usr_data_destroy) {
- canvas->usr_data_destroy (canvas->usr_data);
- }
- canvas->usr_data = data;
- canvas->usr_data_destroy = destroy_fn;
-}
-
-void *spice_canvas_get_usr_data(SpiceCanvas *spice_canvas)
-{
- CanvasBase *canvas = (CanvasBase *)spice_canvas;
- return canvas->usr_data;
-}
-#endif
-
-
static void canvas_clip_pixman(CanvasBase *canvas,
pixman_region32_t *dest_region,
SpiceClip *clip)
diff --git a/common/canvas_base.h b/common/canvas_base.h
index 637cdc1..78e6368 100644
--- a/common/canvas_base.h
+++ b/common/canvas_base.h
@@ -310,9 +310,6 @@ typedef struct {
pixman_image_t *(*get_image)(SpiceCanvas *canvas, int force_opaque);
} SpiceCanvasOps;
-void spice_canvas_set_usr_data(SpiceCanvas *canvas, void *data, spice_destroy_fn_t destroy_fn);
-void *spice_canvas_get_usr_data(SpiceCanvas *canvas);
-
struct _SpiceCanvas {
SpiceCanvasOps *ops;
};
More information about the Spice-commits
mailing list