From: Victor Toso <me@xxxxxxxxxxxxxx> Neither Spice nor spice-gtk seems to be using this. Likely a leftover from the past. Signed-off-by: Victor Toso <victortoso@xxxxxxxxxx> --- common/canvas_base.c | 33 --------------------------------- common/canvas_base.h | 3 --- 2 files changed, 36 deletions(-) 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; }; -- 2.9.3 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel