Commit Graph

68 Commits

Author SHA1 Message Date
Alexander Larsson
d9772344e6 Re-enable cache freeing
I don't know why this was disabled but it seems like a bad idea
2010-06-18 20:27:32 +02:00
Alexander Larsson
cfc86f3340 Convert red_worker.c to use SpiceMarshaller for marshalling 2010-06-18 20:27:31 +02:00
Yonit Halperin
3d7c1eaa18 server: optimize red_pipe_replace_rendered_drawables_with_images (lossy bitmaps support related) 2010-06-09 11:43:31 +02:00
Yonit Halperin
8b02360033 init/destroy lossy surface region 2010-06-09 11:41:02 +02:00
Yonit Halperin
ba32024ad1 enabling jpeg on low bandwidth connection 2010-06-09 11:41:02 +02:00
Yonit Halperin
1a752e3884 not using jpeg when sending a surface to the client (the whole surface)
When a surface is sent to the client using red_send_surface_image, operations were already
performed on it. Thus it may combine, especially if it is a primary surface, both "picture-like" areas
and areas that are more "artificial". In order to avoid noticeable artifacts, such surface will be sent lossless.
2010-06-09 11:41:02 +02:00
Yonit Halperin
0c199b0886 send qxl commands to client: support for resending lossy components when jpeg compression is enabled 2010-06-09 11:41:02 +02:00
Yonit Halperin
c970f41f8e infrastructure routines for resending to the client part of surfaces that have been sent lossy.
The code also handles cases in which the server doesn't hold anymore these surfaces parts, i.e., when
it holds a more updated version of them. This scenario is handled by replacing commands that were rendered, with images.
2010-06-09 11:41:02 +02:00
Yonit Halperin
5d01cae430 introducing lossy and lz compression in red_send_image 2010-06-09 11:41:02 +02:00
Yonit Halperin
2fc2f13be9 lossy surface regions in the client: infrastructure for tracking and updating 2010-06-09 11:41:02 +02:00
Yonit Halperin
5d2ae66f50 support for lossy images in the pixmap cache and fill bits
1) add an option to determine if a bitmap can be sent lossy to the client
2) when required, replacing lossy cache items with their correspending
   lossless bitmaps
2010-06-09 11:41:01 +02:00
Yonit Halperin
263646a1f7 JPEG support: introducing jpeg encoding for spice bitmaps 2010-06-09 11:40:25 +02:00
Yonit Halperin
ea74fc6454 server: fix bitmap flags assignment in red_send_image 2010-06-09 11:25:44 +02:00
Alexander Larsson
f9da2720ae Fix some misspelled identifiers
severty -> severity
SpiceResorceID -> SpiceResourceID
SpiceResorceList -> SpiceResourceList
resorces -> resources
ped_size -> pad_size
postition -> position
2010-05-21 11:14:29 +02:00
Alexander Larsson
d69b0829a6 RedWorkeMessage -> RedWorkerMessage 2010-05-21 10:56:05 +02:00
Alexander Larsson
012bd25779 Fix spelling errors in comments and strings 2010-05-21 10:51:28 +02:00
Gerd Hoffmann
981abd3fee zap vd_interface.h
move over content to spice.h
2010-05-19 11:22:07 +02:00
Gerd Hoffmann
20da2f162a replace worker load/save with loadvm_commands, allow keeping surface content
Add worker->loadvm_commands.  qemu will uses this to send a series of
commands needed to restore state after savevm/loadvm and migration.
That will be one create-surface command per surface and one cursor-set
command for the local pointer.

The worker->save/load functions are not needed any more.
Likewise the interface->{get,set}_save_data callbacks.

Surfaces created via loadvm_commands *will* not be cleared.  Also
primary surfaces are not cleared any more (unconditionally, although
we could do that conditionally on loadvm using the flags field in
QXLSurfaceCreate).
2010-05-19 11:22:07 +02:00
Gerd Hoffmann
6bdf38daf8 surface: keep metadata (aka create command) in device memory.
With this patch applied the spice server will not release surface create
commands for the whole lifecycle of the surface.  When the surface is
destroyed both create and destroy commands are released.

This has the effect that the surface metadata (size, depth, ...) is kept
in qxl device memory.  This in turn makes it alot easier for qemu to
handle savevm/loadvm.  It just needs to do some minimal command parsing
and maintain pointers to the create commands for the active surfaces.
2010-05-19 11:22:07 +02:00
Gerd Hoffmann
d3735feea6 QXL: redesign. 2010-05-19 11:22:06 +02:00
Yonit Halperin
66a7c4a5e5 server: fix invalid self loop in surfaces dependencies.
Cyclic dependencies between surfaces mustn't occur. They can cause invalid rendering -
recent drawables might be rendered before older ones.
2010-05-03 16:40:37 +02:00
Alexander Larsson
ae40f270cf Remove all mentions of "cairo" from the code
The command line option is renamed from "cairo" to "sw", and
similarly all filenames and types from Cairo to Sw (and similar).
2010-05-03 12:38:02 +02:00
Alexander Larsson
295c8ed8bc Don't send alpha bytes for primary surface
The framebuffer is not used as a source for alpha blends, so we never
need to scan it for alpha bytes.
2010-04-30 09:54:01 +02:00
Gerd Hoffmann
7425253cec iovec: add sanity check
Adds sanity check to iovec setup.  In theory this should never ever
trigger.  In practice guest driver bugs can make it trigger.  This
patch avoids qemu burning cpu in a endless loop, instead we'll print a
message and abort.  Not sure whenever there is a more graceful way to
handle the situation ...
2010-04-29 18:20:15 +02:00
Gerd Hoffmann
ae8429d0c5 fix worker->stop surface cleanup 2010-04-29 18:19:56 +02:00
Alexander Larsson
42e83e3843 Add support for SPICE_IMAGE_FLAGS_HIGH_BITS_SET 2010-04-28 15:43:41 +02:00
Alexander Larsson
c2f38a68ba If we have alpha in a 32bit rgb surface, ensure we send that
If we don't then alpha is lost which is problematic if the surface
is later used as with alpha_blend and SRC_SURFACE_HAS_ALPHA.
2010-04-23 16:41:47 +02:00
Alexander Larsson
395b5a5626 Server: Use the right image format when updating from a surface 2010-04-23 16:41:47 +02:00
Alexander Larsson
4f5a09a73d Make each surface its own depth/format
Surface creation now specifies the exact format, not only the bit depth
of each surface which is used for rendering.

Additionally we now actually store the surfaces in that format, instead
of converting everything to 32bpp when drawing or e.g. handling palettes.
2010-04-23 16:41:42 +02:00
Alexander Larsson
98d91203c5 Make client canvas and pixmaps handle more formats and simplify
We now support 16bit format pixmaps as well as the old ones. Including
both 555 and 565 modes.

We drop the palette argument for pixmap construction as it was only
used for black/white anyway.

Canvas creation is simplified so that there is no separate set_mode
state. Canvases are already created in the right mode and never change.
2010-04-23 16:36:35 +02:00
Izik Eidus
99341e058f spice: server: change update_area command
The new command return dirty area to be used
by users that want spice to render localy or
into some framebuffer (sdl / vnc)

Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-14 19:38:49 +03:00
Alexander Larsson
c97116aeb9 Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +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
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
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
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
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
Alexander Larsson
d94cb8e1ba Use spice allocator in server/ 2010-03-11 12:14:08 +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
505f7d8832 new libspice api: make image_compression_t part of the public api. 2010-03-09 14:29:51 +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