[Spice-devel] [PATCH spice-server] red-stream: Handle reading of 0 bytes in red_stream_async_read

2018-01-17 Thread Frediano Ziglio
Currently red_stream_async_read cannot handle read of 0 bytes. This would cause a wrong assert in async_read_handler. Fixing the assert would just make the code wrongly detect a disconnection (usually a return of 0 from read is handled that way but happens also if you try to read 0 bytes). Current

Re: [Spice-devel] xf86-video-qxl + libspice-server: no image on FreeBSD

2018-01-17 Thread Oleg Ginzburg
On Thu, Jan 11, 2018 at 1:45 PM, Frediano Ziglio wrote: > > On Tue, Jan 9, 2018 at 10:09 PM, Frediano Ziglio < fzig...@redhat.com > > > wrote: > > > > > Hello! > > > > > > > I would really like to see XSpice and xf86-video-qxl on FreeBSD. > > > > > > > The correction for the FreeBSD build libspic

Re: [Spice-devel] xf86-video-qxl + libspice-server: no image on FreeBSD

2018-01-17 Thread Christophe Fergeau
hey, On Wed, Jan 17, 2018 at 12:15:03PM +0300, Oleg Ginzburg wrote: > Confirm - these changes work successfully, tested on: FreeBSD 11.1-RELEASE > and FreeBSD 12-CURRENT (aka HEAD). > > Will these changes be included in the next release? > > There is another small issue of build libspice-server

Re: [Spice-devel] xf86-video-qxl + libspice-server: no image on FreeBSD

2018-01-17 Thread Frediano Ziglio
> > hey, > > On Wed, Jan 17, 2018 at 12:15:03PM +0300, Oleg Ginzburg wrote: > > Confirm - these changes work successfully, tested on: FreeBSD 11.1-RELEASE > > and FreeBSD 12-CURRENT (aka HEAD). > > > > Will these changes be included in the next release? > > > > There is another small issue of b

Re: [Spice-devel] RFC [spice-gtk] session: Allow to delay sending clipboard to the guest

2018-01-17 Thread Javier Celaya
El vie, 12-01-2018 a las 08:05 -0500, Marc-André Lureau escribió: > Hi > > - Original Message - > > On Thu, Jan 11, 2018 at 12:35:36PM -0500, Marc-André Lureau wrote: > > > > I agree with you that some help from the windowing/toolkit > > > > would be good > > > > to have, but in this case,

[Spice-devel] [PATCH spice-common 0/8] Windows stuff cleanup

2018-01-17 Thread Frediano Ziglio
Remove obsolete stuff required for old GDI canvas. Actually these stuff were not used. Frediano Ziglio (8): canvas: Move PixmanData to C file canvas: Remove mutex field from PixmanData canvas: Remove Windows bitmap allocation canvas: Remove unused dc parameter from surface_create canvas:

[Spice-devel] [PATCH spice-common 2/8] canvas: Remove mutex field from PixmanData

2018-01-17 Thread Frediano Ziglio
The field is only assigned but never used. Signed-off-by: Frediano Ziglio --- common/canvas_utils.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/common/canvas_utils.c b/common/canvas_utils.c index 626f17d..a6527e7 100644 --- a/common/canvas_utils.c +++ b/common/canvas_utils.c

[Spice-devel] [PATCH spice-common 7/8] canvas: Unify __surface_create_stride and surface_create_stride

2018-01-17 Thread Frediano Ziglio
They are now just the same function with same parameters, just one calls the other. Signed-off-by: Frediano Ziglio --- common/canvas_utils.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/common/canvas_utils.c b/common/canvas_utils.c index 3e143de..a95501f 10064

[Spice-devel] [PATCH spice-common 8/8] canvas: Remove unused include header

2018-01-17 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- common/canvas_base.h | 3 --- common/canvas_utils.h | 4 2 files changed, 7 deletions(-) diff --git a/common/canvas_base.h b/common/canvas_base.h index b746bcb..27e2751 100644 --- a/common/canvas_base.h +++ b/common/canvas_base.h @@ -25,9 +25,6 @@ #inclu

[Spice-devel] [PATCH spice-common 5/8] canvas: Remove dc parameter from SwCanvas::put_image

2018-01-17 Thread Frediano Ziglio
Not used anymore. Signed-off-by: Frediano Ziglio --- common/canvas_base.h | 3 --- common/sw_canvas.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/common/canvas_base.h b/common/canvas_base.h index 2d3c35b..b746bcb 100644 --- a/common/canvas_base.h +++ b/common/canvas_base.h @@ -141,9

[Spice-devel] [PATCH spice-common 1/8] canvas: Move PixmanData to C file

2018-01-17 Thread Frediano Ziglio
This structure is used only in canvas_utils.c Signed-off-by: Frediano Ziglio --- common/canvas_utils.c | 9 + common/canvas_utils.h | 9 - 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/common/canvas_utils.c b/common/canvas_utils.c index 0be761a..626f17d 100644 --

[Spice-devel] [PATCH spice-common 3/8] canvas: Remove Windows bitmap allocation

2018-01-17 Thread Frediano Ziglio
There's no reason to use a DIB section if we are going to use just the memory in it assigned to a pixman surface, use normal path and memory. Signed-off-by: Frediano Ziglio --- common/canvas_utils.c | 105 -- 1 file changed, 105 deletions(-) diff

[Spice-devel] [PATCH spice-common 4/8] canvas: Remove unused dc parameter from surface_create

2018-01-17 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- common/canvas_base.c | 36 ++-- common/canvas_utils.c | 7 +-- common/canvas_utils.h | 5 - 3 files changed, 7 insertions(+), 41 deletions(-) diff --git a/common/canvas_base.c b/common/canvas_base.c index 39439ed..d295

[Spice-devel] [PATCH spice-common 6/8] canvas: Remove dc fields from CanvasBase and LzDecodeUsrData

2018-01-17 Thread Frediano Ziglio
Now always NULL. Signed-off-by: Frediano Ziglio --- common/canvas_base.c | 17 - common/canvas_utils.c | 19 +-- common/canvas_utils.h | 8 3 files changed, 1 insertion(+), 43 deletions(-) diff --git a/common/canvas_base.c b/common/canvas_base.c index

Re: [Spice-devel] xf86-video-qxl + libspice-server: no image on FreeBSD

2018-01-17 Thread Oleg Ginzburg
On Wed, Jan 17, 2018 at 2:02 PM, Christophe Fergeau wrote: > hey, > > On Wed, Jan 17, 2018 at 12:15:03PM +0300, Oleg Ginzburg wrote: > > Confirm - these changes work successfully, tested on: FreeBSD > 11.1-RELEASE > > and FreeBSD 12-CURRENT (aka HEAD). > > > > Will these changes be included in th

Re: [Spice-devel] xf86-video-qxl + libspice-server: no image on FreeBSD

2018-01-17 Thread Oleg Ginzburg
On Wed, Jan 17, 2018 at 2:18 PM, Oleg Ginzburg wrote: > > > On Wed, Jan 17, 2018 at 2:02 PM, Christophe Fergeau > wrote: > >> hey, >> >> On Wed, Jan 17, 2018 at 12:15:03PM +0300, Oleg Ginzburg wrote: >> > Confirm - these changes work successfully, tested on: FreeBSD >> 11.1-RELEASE >> > and Free

[Spice-devel] [PATCH spice-common 3/5] lz: Avoid temporary variable

2018-01-17 Thread Frediano Ziglio
Use a break to exit the loop instead of using a variable. Signed-off-by: Frediano Ziglio --- common/lz_decompress_tmpl.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/common/lz_decompress_tmpl.c b/common/lz_decompress_tmpl.c index 04a5121..0189f86 100644 --- a/

[Spice-devel] [PATCH spice-common 5/5] lz: Remove unused encode_level and only assigned io_start

2018-01-17 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- common/lz.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/common/lz.c b/common/lz.c index 28f450b..b7e7d48 100644 --- a/common/lz.c +++ b/common/lz.c @@ -90,7 +90,6 @@ typedef struct Encoder { // (2) a pointer to the first byte in the segment th

[Spice-devel] [PATCH spice-common 4/5] lz: Simplify code

2018-01-17 Thread Frediano Ziglio
Remove some conditional code always defining CAST_PLT_DISTANCE macro. Signed-off-by: Frediano Ziglio --- common/lz_decompress_tmpl.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/common/lz_decompress_tmpl.c b/common/lz_decompress_tmpl.c index 0189f86..d445c70

[Spice-devel] [PATCH spice-common 2/5] canvas: Remove possible leak on LZ decompression failure

2018-01-17 Thread Frediano Ziglio
longjmp can happen in different places, even after the palette is allocated so we need to free it if it got allocated. Signed-off-by: Frediano Ziglio --- common/canvas_base.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/canvas_base.c b/common/canvas_base.c ind

[Spice-devel] [PATCH spice-common 1/5] canvas: Simplify code using spice_memdup

2018-01-17 Thread Frediano Ziglio
Instead of using spice_malloc+memcpy use spice_memdup which is doing the same. Signed-off-by: Frediano Ziglio --- common/canvas_base.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/common/canvas_base.c b/common/canvas_base.c index 39439ed..f4f301c 100644 --- a/common/ca

Re: [Spice-devel] [PATCH spice-common 1/5] canvas: Simplify code using spice_memdup

2018-01-17 Thread Uri Lublin
Hi Frediano, Some of those changes are a matter of style (e.g. remove variable). Ack Series. Thanks, Uri. On 01/17/2018 05:55 PM, Frediano Ziglio wrote: Instead of using spice_malloc+memcpy use spice_memdup which is doing the same. Signed-off-by: Frediano Ziglio --- common/canvas_base