Commit Graph

187 Commits

Author SHA1 Message Date
Alexander Larsson
ee035787ef Fix win32 build with pixman 0.18.0 2010-04-12 21:43:15 +02:00
Alexander Larsson
288a9ad03f Use fast DCT method for better jpeg compression performance 2010-04-12 20:54:35 +02:00
Izik Eidus
ad1a4849ee spice server: fix validate_chunk
Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-12 13:43:38 +03:00
Izik Eidus
85d4355d79 fix 16bpp support on cairo_canvas
Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-12 11:57:34 +03:00
Alexander Larsson
063af4a4f3 Always tread depth 24 (i.e. non alpha) as depth 32 when blitting
When blitting we don't really care about alpha mismatches, we just copy bits
anyway.
2010-04-12 10:32:25 +02:00
Izik Eidus
03fb4e05be take the right lock when freeing glz stuff of surfaces
this was noticed by Yonit.

Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-09 22:47:03 +03:00
Alexander Larsson
34fb3f6806 Split out the memslot stuff from red_worker.c to its own files
This is required so that we can have code in other files that does address
validation.
2010-04-09 16:51:52 +02:00
Yonit Halperin
a3700a1bfb server: fix race condition in lz global dictionary, in its image segments list 2010-04-09 10:11:09 +02:00
Izik Eidus
22d1ac9eb5 spice: win32 client: fix gdi locking
While the fix could have been more effective,
it seems like this patch stream better with the coding
logic that was there..., maybe later we will want to change
the locking into more effective way.

(There is just the primary surface to protect in reiality)

Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-09 05:09:02 +03:00
Alexander Larsson
187a4230e5 Remove leftover AutoVStreamInit class 2010-04-08 17:48:40 +02:00
Alexander Larsson
de4306af33 Initialize _kill_mark so we don't get spurious valgrind warnings 2010-04-08 17:09:32 +02:00
Alexander Larsson
18485cef06 Free the jpeg decoder with the stream 2010-04-08 16:35:10 +02:00
Alexander Larsson
5059c304be Use libjpeg to decode mjpegs, not ffmpeg
This is pretty straightforward, although there are two weird issues.
The current encoder has two bugs in the yuv conversion. First of all
it switches red and blue, due to something of an endianness issue. We
keep this behavior by switching red and blue. Maybe we want to
change this in the new protocol version since switching this may
cause jpeg compression to be worse.

Secondly, the old coder/decoder did rgb to/from yuv420 wrongly for
jpeg, not using the "full scale" version of Y that is used in jpeg,
but the other one where y goes from 16 to 235. (See jpeg/jfif
reference on http://en.wikipedia.org/wiki/YCbCr for details.)
The new decoder uses the full range in order to get better quality,
which means old encoders will show slightly darker images.

This completely removes all ffmpeg usage in the client
2010-04-08 11:30:18 +02:00
Alexander Larsson
ed568302ad Update project file to visual studio 2008 2010-04-08 09:30:16 +02:00
Izik Eidus
80e1379ff6 spice server: fix not sent depth size for surfaces
Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-08 10:25:07 +03:00
Alexander Larsson
601509e5f8 Remove non-used lookup3.[ch] 2010-04-07 09:40:21 +02:00
Yonit Halperin
4acf155fb2 server configuration: make network redirection support optional
By default it is disabled. To enable: configure --enable-tunnel.
When active, requires libslirp.
2010-04-06 17:45:04 +02:00
Yonit Halperin
88aa56045a client: handling SPICE_MSG_MAIN_MIGRATE_SWITCH_HOST
disconnecting from the current host and connecting to the target host.
2010-04-06 14:56:46 +02:00
Yonit Halperin
91bc0e8625 client: fix unsafe access to an event member 2010-04-06 11:34:21 +02:00
Izik Eidus
cc943035c9 spice server: try to be less brutal when changing res or when flushing the tree
The idea is that we can try to defer some stuff to be later
send in the pipe if the pipe is not fulled yet, moreover
we will then walk on the pipe using:
red_clear_surface_drawables_from_pipe() and will try to
remove the uneeded objects of this surface

Still some room to improvment but later...

Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-06 02:02:38 +03:00
Izik Eidus
da2afcff8c spice server: remove surface_id and surfaces_dest[3] from guest mem
Validate the surface_ids just once and keep them in safe
memory area

Make things simpler

Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-06 01:11:59 +03:00
Izik Eidus
e1a4d91896 spice: common: gdi_canvas fix gdi objects leak
BitmapMask was used by the draw_text function as well
therefore we need to mark from_surface = 0 if we want
it to release the boject...

(Was evil, took me few hours to understand from where
 the leak come...)

Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-05 22:57:37 +03:00
Izik Eidus
9076297d1d spice-server: when destroying a surface don`t send uneeded items
Just skip the items of destroyed surface that are found in the pipe
before we skip them, we check if they are needed by other users...

Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-05 07:39:05 +03:00
Izik Eidus
2ae3ab9e09 spice-server: remove glz objects related to surface when destroying a surface
make the surface released faster in the release ring
as well as clean unneeded reference into the glz

Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-05 05:39:39 +03:00
Izik Eidus
925140aa03 spice: reds: fix uninitlized pointer
Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-05 05:33:14 +03:00
Yonit Halperin
6f40c593e9 client: x11: fix a crash caused by a call to a destroyed window.
Happens when a focused window is destroyed without a focus out event,
and a focus-in event occurs on another window.
2010-04-03 05:55:00 +03:00
Izik Eidus
4a208b3644 libspice: add off screens support
Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-03 05:35:31 +03:00
Izik Eidus
27a8ec1ef4 spice server: surface create/destroy protocol support
Now we can send commands from the server to the client
to destroy surfaces (right now just the primary surface)

Needed for offscreens support)

Another patch`s on the way.

Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-03 05:34:48 +03:00
Alexander Larsson
e9b5846704 Rename .so spice-server.so
Also change include dir to "spice-server" for consistency.

libspice.so conflicted with the tclspice package, and its also
a clarification for when we create a spice client library.
2010-03-24 17:13:42 +01:00
Alexander Larsson
ce0d8a094c Add spice_strndup
Also, make str(n)dup handle NULL correctly
2010-03-24 17:02:20 +01:00
Alexander Larsson
4a36b98440 Get rid of more out-of-memory checks
We already check this in spice_malloc now
2010-03-24 15:57:33 +01:00
Yonit Halperin
66310f99e0 spice: server: Being more permissive in video identification
In 'filter' video streaming mode, use a more permissive threshold for distinguishing
'realistic' streams from 'textaul'/'artificial' streams. The previous threshold classified
streams that were scaled on the guest as artificial and thus they were not recoginized as videos.
2010-03-24 15:23:39 +01:00
Alon Levy
77f6d70541 spice: client: fix handling of top down images in video streams
Top down streams arrive from x11-qxl driver.
2010-03-24 15:23:20 +01:00
Yonit Halperin
d2edac47cd spice: server: avoid video streaming of small images
I added a lower limit to the size of images that are being streamed.
The limit is only active in "filter" video streaming mode.
This will prevent blurry animated icons.
2010-03-24 15:23:07 +01:00
Alexander Larsson
fa3dddc0db rename spice.pc to spice-server.pc 2010-03-24 15:08:57 +01:00
Alexander Larsson
1c98a3536b configure.ac: client: replace $(top_srcdir) in x11/Makefile.am (subdir config)
Replace all "$(top_srcdir)/common" with "$(SPICE_COMMON_DIR)"
and     all "$(top_srcdir)/client" with custom "$(CLIENTDIR)"

This would (after following patches) enables building the client from
either spice/ (top directory) or spice/client.
2010-03-24 15:04:30 +01:00
Uri Lublin
be45068b0a configure.ac: define SPICE_COMMON_SRCDIR, to be used by Makefile.am (subdir config)
Note that SPICE_COMMON_SRCDIR may be overwritten by configure.ac.shared

Signed-off-by: Uri Lublin <uril@redhat.com>
2010-03-24 14:56:55 +01:00
Uri Lublin
287b1cd389 autogen: exit upon errors (subdir config)
Signed-off-by: Uri Lublin <uril@redhat.com>
2010-03-24 14:03:51 +01:00
Uri Lublin
7da0ccc65e autogen: add possibly missing AUTOMAKE definition (subdir config)
Signed-off-by: Uri Lublin <uril@redhat.com>
2010-03-24 14:03:36 +01:00
Uri Lublin
3b58f557af autogen: remove copied code - srcdir and ORIGDIR (subdir config)
Signed-off-by: Uri Lublin <uril@redhat.com>
2010-03-24 14:03:18 +01:00
Alexander Larsson
dcef400d30 Fix uninitilized memory read in stroke_fill_spans()
y2 was not initialized
2010-03-18 10:40:18 +01:00
Gerd Hoffmann
b5f25486ef new libspice api: spice_server_add_get_{sock, peer}_info() 2010-03-18 10:26:01 +01:00
Gerd Hoffmann
7c1c66a10e new libspice api: spice_server_add_renderer() 2010-03-18 10:23:52 +01:00
Yonit Halperin
457693fcfa client: add command line support for ciphers, ca file, and host certificate subject 2010-03-18 10:21:47 +01:00
Alexander Larsson
f16e16393e Default opt flags to -O2
gcc -O3 has some code generation failures due to a combination of
unaligned (packed) structs and vectorization that can cause
a crash in canvas_localize_palette().

And its just safer to use -O2, which is the standard "trusted"
optimization flags.
2010-03-17 22:09:41 +01:00
Alexander Larsson
da21e89daa Use nearest scaling for DRAW_ALPHA_BLEND since this is what win32 needs
DrvAlphaBlend is the only current user of DRAW_ALPHA_BLEND, and its
defined to do nearest (COLORONCOLOR) scaling, not bilinear.
2010-03-17 20:08:59 +01:00
Alexander Larsson
6664c12278 Fix up empty region checks in canvas operations
We rely on not passing on empty rects to the drawing operations by
checking for empty regions and exiting early. However the checks
were wrongly using pixman_region32_n_rects(region) == 0, whereas
we should be using pixman_region32_not_empty().
2010-03-17 10:06:40 +01:00
Søren Sandmann Pedersen
46ad8fd070 Explicitly depend on various X libraries, and -pthread
In Fedora 13, the linker doesn't pull in DT_NEEDED libraries anymore,
so we have to list the things that we depend on explicitly.

This affects several X extension libraries, and also the pthread
library.
2010-03-11 06:37:41 -05:00
Alexander Larsson
d94cb8e1ba Use spice allocator in server/ 2010-03-11 12:14:08 +01:00
Alexander Larsson
af4672326b Use the spice allocator in common/ 2010-03-11 12:14:08 +01:00