Commit Graph

65 Commits

Author SHA1 Message Date
Alexander Larsson
c97116aeb9 Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22: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
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
Alexander Larsson
de4306af33 Initialize _kill_mark so we don't get spurious valgrind warnings 2010-04-08 17:09:32 +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
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
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
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
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
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
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
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
Alexander Larsson
d94cb8e1ba Use spice allocator in server/ 2010-03-11 12:14:08 +01:00
Alexander Larsson
440ac41cf1 New memory allocators that exit on OOM and handle multiplication overflow
Every place that does a regular malloc/calloc and aborts on failure
should use spice_malloc/spice_mallo0 instead, which is leaner and cleaner.

Allocations of dynamically sized arrays can use g_malloc_n or g_new etc
which correctly handle multiplication overflow if some of the arguments
are not trusted.
2010-03-11 12:13:59 +01:00
Alexander Larsson
eccbe9bb1a Revert "Fix possible quic_usr_more_lines_unstable() crash"
This reverts commit 34e6a0a0d5.

Turns out this wasn't needed and the crash was due to other changes.
2010-03-10 12:06:41 +01:00
Gerd Hoffmann
52ec6a48ee new libspice api: add spice_server_set_mouse_absolute() 2010-03-09 14:56:37 +01:00
Gerd Hoffmann
593fb119bc new libspice api: add spice_server_set_channel_security() 2010-03-09 14:53:37 +01:00
Gerd Hoffmann
0c23da34c5 new libspice api: make spice_channel_name_t part of the public api. 2010-03-09 14:51:40 +01:00
Gerd Hoffmann
d60d3eda88 new libspice api: add spice_server_{get, set}_image_compression()
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2010-03-09 14:33:24 +01:00
Gerd Hoffmann
505f7d8832 new libspice api: make image_compression_t part of the public api. 2010-03-09 14:29:51 +01:00
Gerd Hoffmann
2e1b661434 new libspice api: configure listen addr, add ipv6 suppor 2010-03-09 14:23:57 +01:00
Gerd Hoffmann
b4f5752a0e new libspice api: configure tls 2010-03-09 14:22:19 +01:00
Gerd Hoffmann
1ecd01f586 new libspice api: zap function pointer indirection.
Make register_*_notifier calls optional, long term they should go away
entriely.  Add direct library calls as replacement.
2010-03-09 14:20:36 +01:00
Gerd Hoffmann
4e014aa13f new libspice api: configure port + ticket
Add new functions to configure spice port and ticketing.  Yes, this is
incomplete, it includes just the most important bits to get something
up'n'running.

These functions are supposed to replace both spice_parse_args() and
the monitor interaction via qterm interface.
2010-03-09 14:18:20 +01:00
Gerd Hoffmann
232dbd8710 new libspice api: alloc, initi and free spice server instances.
The implementation can't handle multiple spice server instances at the
same time right now.  The API allows this though, so if we fixup the
implementation some day we don't have to change the API.
2010-03-09 14:14:02 +01:00
Gerd Hoffmann
34e6a0a0d5 Fix possible quic_usr_more_lines_unstable() crash
quic_usr_more_lines_unstable() assumes it can allways copy a complete
scanline.  Well, it can't.  In case the screen rectangle which needs
updating has an x-offset greater than zero *and* includes the last
scanline of the screen it will overflow the source buffer by
x-offset * bytes-per-pixel bytes.
2010-03-09 13:38:13 +01:00
Alexander Larsson
90c5766caf Use macros from <spice/macros.h> rather than duplicate them 2010-03-09 11:10:00 +01:00
Alexander Larsson
f8217d8b96 Move virtualization of canvas drawing into common/canvas_base
Instead of having two virtualizations of the canvas we push the
virtualization into the canvas code itself. This not only avoids
the duplication of this code, it also makes the exposed API for the
canvas much smaller (in terms of exported API).

It also lets us use the virtualization to implement basic support
for operations in canvas_base which is then overridden by each canvas
implementation.
2010-03-08 19:45:28 +01:00
Alexander Larsson
05697e502d Make virt mapping an interface 2010-03-08 19:45:28 +01:00
Alexander Larsson
f7a77f9881 Make glz_decoder non-optional canvas_base in canvas constructors
It can still be NULL, but we simplify the headers by always including it.
There is no practical performance difference here.
2010-03-08 19:45:27 +01:00
Alexander Larsson
239b2b66b2 Remove qcairo dependency, only use pixman 2010-02-23 22:52:06 +01:00
Alexander Larsson
7992266ccf Remove cairo_t from cairo canvas 2010-02-23 22:52:06 +01:00
Alexander Larsson
98dde80ed3 Replace custom region implementation with pixman_region32_t
pixman_region32_t is an efficient well tested region implementation (its
the one used in X) that we already depend on via pixman and use in
some places. No need to have a custom region implementation.
2010-02-23 22:52:06 +01:00
Alexander Larsson
16780a7b81 Use pixman_image_t instead of cairo_surface_t as the generic pixman container
This allows us to use the simpler dependency of pixman outside of the
cairo backend, and it later lets us move the cairo backend to using
pixman only.
2010-02-23 22:52:01 +01:00
Alexander Larsson
0b0342ee7e Turn image and palette cache into c style dynamic interface
Instead of passing a bunch of function pointer and an opaque
pointer we make a real type and add a vtable pointer to it.
This means we can simplify all the canvas constructors, etc.
2010-02-23 14:43:20 +01:00
Alexander Larsson
60a189f250 Add line rasterizer 2010-02-23 14:43:20 +01:00
Alexander Larsson
9091e763a8 Add pixman utilities
This includes:
 * pixman region from SpiceRects
 * rop2 enum
 * solid fill
 * solid fill with rop
 * tiled fill
 * tiled fill with rop
 * blit
 * blit with rop
 * copy rect
2010-02-23 14:43:15 +01:00
Alexander Larsson
39be5a8b13 Use standard int types and <spice/types.h> 2010-02-04 18:49:05 +01:00
Alexander Larsson
16540e9953 Use the new header names
I just ran:
 find -name "*.[ch]" | xargs sed -i -f ../spice-protocol/includes.sed
 find -name "*.cpp" | xargs sed -i -f ../spice-protocol/includes.sed
2010-02-04 18:49:05 +01:00