Commit Graph

531 Commits

Author SHA1 Message Date
Gerd Hoffmann
4207c49fe2 move command flags handling to the qxl parser
Pass through command flags to the qxl parser, so we can hide all
compat bits for spice 0.4 within the qxl parser.
2010-09-14 10:41:49 +02:00
Hans de Goede
4efeef3302 spicec-x11: Fix going into a never ending loop upon xrandr event (#628573) (v2)
When handling an xrandr event the event_listener->on_monitors_change()
callback destroys and re-creates the monitor object(s) which results
in the DynamicScreen or MultyMonconstructor being called, which triggers
more xrandr events. This causes a never ending event handling loop making
spicec hang, and eventually making the X-server crash as a backlog
of events builds up and it oom's.

This patches this by explictly processing the xrandr event caused
by the constructor inside the constructor surrounded by the already
present guard code against recursive xrandr events.
2010-09-09 16:25:24 +02:00
Yonit Halperin
039700a90f server: avoid creating a stream from traces more than once for the same drawable
could have caused ASSERT(!drawable->stream) in red_create_stream
2010-09-02 18:45:09 +02:00
Alexander Larsson
0c6d654c2f Add API to turn on backwards compatibility mode
When upgrading a cluster of machines you typically do this by
upgrading a set of machines at a time, making the new machines run
the new software version, but in a fashion compatible with the old
versions (in terms of e.g. migration). Then when all machines are
upgrades, any new features in the new version can be enabled.

This API allows qemu to limit the set of features that spice uses to
those compatible with an older version, in order to do an upgrade like
this. Right now it doesn't really do much, since we don't keep compat
with 0.4.0 atm (although that may be added later).

There is no guarantee that any future version of spice support
being compatible with any previous version. However, we will always
support compatibility with the previous major version so that clusters
can be upgraded step by step.
2010-09-02 10:22:41 +02:00
Alexander Larsson
fc2a84eb5b Bump version to 0.6.0 2010-08-31 14:42:20 +02:00
Alexander Larsson
0fb07f07ea Require spice-protocol 0.6.0 2010-08-31 14:41:44 +02:00
Alexander Larsson
c0583f6fe8 Update NEWS for release 2010-08-31 14:11:05 +02:00
Alexander Larsson
012e54bf9f Fix scaling with large magnification
When scaling part of an image we need to specify the source
coordinates in transformed coordinates. For large magnifications this
means we will get pretty large values.

Now, if e.g. src_x * transform is larger than 32765, then the
coordinate ends up outside the pixman 16bit image size, so the
rendering will not work.

The fix is to make the src_x/y offset part of the transformation.
This means its automatically transformed by the correct scaling, and
the coordinates passed into pixman are not (typically) over 16bit.
2010-08-31 13:31:19 +02:00
Alexander Larsson
2e860b5b4a Revert "Fix scaling with large magnification"
This reverts commit e13be77f33.
2010-08-31 13:31:19 +02:00
Alon Levy
c47def6e48 client: add default agent capabilities 2010-08-31 14:30:00 +03:00
Gerd Hoffmann
3ce690d58d qxl parser: complete parsing of QXLCompatDrawable structs 2010-08-31 13:17:15 +02:00
Yonit Halperin
8bc4fe0344 server: red_current_add_equal - don't push a drawable to the middle of the pipe if it depends on surfaces.
This will prevent: 1) rendering problems (commands sent to the client in the wrong order)
2) sending commands for surfaces that haven't been created yet on the client side.
2010-08-31 13:26:46 +03:00
Alon Levy
5b441c9bc5 server: when woken up by data ready to be read, don't call write.
This used to be a callback for the vdi_port "data ready" interrupt,
which did indicate either data ready to read or data ready to write, but
this is no longer the case now that virtio-serial is used.

This seemingly simple fix prevents a race that needs to be fixed with
another patch, see freedesktop bz #29903
2010-08-31 12:47:29 +03:00
Alon Levy
4ef938f2b0 server: retry mouse send on queue full 2010-08-31 12:43:31 +03:00
Alon Levy
40232f00ab server: bugfix - make vdi_port_write_retry reiterate if write_queue still not empty
The vdi_port_write_timer_started flag was not being reset, which prevented
another vdi_port_write_timer_start from actually starting the timer. Fix
is to change order of lines. This happens in the callback of the timer, so
no chance of double timer set.
2010-08-31 12:09:50 +03:00
Alon Levy
18466b8b55 client: add announce_capabilities 2010-08-31 11:08:09 +03:00
Alon Levy
7166d95777 server: add subtype to SpiceCharDeviceInterface, use for vdagent 2010-08-31 11:00:50 +03:00
Alon Levy
061ec276ec server: rename SpiceVDIPort* to SpiceCharDevice* 2010-08-31 10:59:34 +03:00
Yonit Halperin
fbd874a464 server: fix red_current_flush to flush only the surface that was given as parameter
A side effect of the previous red_current_flush, which flushed all the surfaces, and was called on a new display channel connection, was
that red_handle_drawable_surfaces_client_synced sent the most updated surfaces images when needed. However, now, it should
explicitly call red_current_flush.
Moreover, since red_current_flush was called on a new display channel connection only if there was a primary surface,
if the connection of the display channel occurred at the moment of no primary surface, red_handle_drawable_surfaces_client_synced was buggy.
2010-08-30 18:53:29 +03:00
Alexander Larsson
e13be77f33 Fix scaling with large magnification
When scaling part of an image we need to specify the source coordinates
in transformed coordinates. For large magnifications this means
we will get pretty large values.

Now, if e.g. src_x * transform is larger than 32765, then the coordinate
ends up outside the pixman 16bit image size, so the rendering
will not work.

In order to work around this we generate a "sub-image" of the pixman
image such that the src_x/y values we have to specify are zero (or near
zero).
2010-08-30 16:56:41 +02:00
Gerd Hoffmann
b718f59d46 Bump versions.
Update #define in server/spice.h in preparation for the 0.6.0 release.
We also got some new functions, thus we have to increate the shared
lib minor number for spice-server.
2010-08-30 16:12:25 +02:00
Gerd Hoffmann
9681ebb671 Add config functions.
A bunch of configuration functions where never ported forward from
rhel-6 to upstream.  Add them so we can add qemu config options for
these settings.
2010-08-30 16:12:25 +02:00
Alon Levy
94028c1348 Merge commit 'ea298a14e1cde8b811baf6bd187287f18dde0dee' 2010-08-30 16:12:49 +03:00
Alon Levy
ea298a14e1 server: moved agent pipe headers to spice-protocol 2010-08-30 14:50:02 +03:00
Yonit Halperin
494f5d4e2c server: cleanups in destorying surfaces code 2010-08-30 10:12:16 +03:00
Yonit Halperin
27f18287e8 server: really wait for a surface to be destroyed, when calling destroy_surface_wait
Waiting till all the pipe items that are dependent on the surface will be sent.
This was probably the cause for freedesktop bug #29750.
2010-08-30 10:12:01 +03:00
Yonit Halperin
1c8ec8f1cf server: consider also PIPE_ITEM_UPGRADE when searching for drawables in red_clear_surface_drawables_from_pipe 2010-08-30 10:11:47 +03:00
Alexander Larsson
9ac9099842 canvas: Better coordinate rounding in scaling
When scaling in pixman you give the source coordinates in transformed
space rather than in the source coordinates. This is a bit problematic
when both source and destination coordinates are at integer positions, but
the scaling factor is not an exact 16.16 fixed point value. We used
to calculate the transformed source based on the floating point
transformation, which gave the wrong answer sometimes. Now we do the
calculations based on the fixed point transform that we give pixman.

However, even with this patch I can still sometimes see issues related
to this, although they are less bad.
2010-08-27 16:33:35 +02:00
Alexander Larsson
250203951b server: red_send_image() - append image data to right marshaller
The actual bitmap data was added to the main marshaller rather than
the submarshaller that pointed to the SpiceImage part. This made us
send too short messages failing demarshalling in the client.
2010-08-27 11:19:20 +02:00
Alexander Larsson
c13f931b5f server: red_send_image() initialize bitmap.flags
We're currently sending this to the network based on random memory.
2010-08-27 11:19:01 +02:00
Gerd Hoffmann
80bb4d95a0 zap more unused bits.
BufDescriptor isn't used at all.
Two AddBufInfo fields (slot_id and group_id) are not used any more.
2010-08-27 09:21:04 +02:00
Gerd Hoffmann
36a8113380 red_get_cursor: avoid extra copy 2010-08-27 08:43:44 +02:00
Gerd Hoffmann
81e14d76d1 fix red_cursur_flush segfault 2010-08-26 23:59:29 +02:00
Gerd Hoffmann
b274fcf3f5 zap dead typedefs 2010-08-26 23:41:42 +02:00
Gerd Hoffmann
465ecbb818 zap dead qxl chunk code 2010-08-26 23:39:14 +02:00
Gerd Hoffmann
a05741ce1b qxl parser: add cursor parsing 2010-08-26 23:37:24 +02:00
Gerd Hoffmann
ea2f97a810 qxl parser: complete QXL_SURFACE_CMD_CREATE parsing 2010-08-26 22:29:12 +02:00
Alexander Larsson
96987ebfde server: Fix alloc_lz_image_surface stride allocations
All lz surfaces are not 4 bytes per pixel, calculate the right stride
based on the pixman format.
2010-08-26 09:38:36 +02:00
Yonit Halperin
b9b5f8fd56 server: clean glz drawables when reseting qxl
When the we reset qxl, we destroy all srufaces. Since surfaces and glz
drawables are no longer dependent, we need to call red_display_clear_glz_drawables explicitly
in order to clear all our drawables references in the server.
2010-08-25 15:14:35 +03:00
Alexander Larsson
cbb9f700be server: Add missing break in switch case 2010-08-25 13:38:49 +02:00
Alexander Larsson
2df2b3df1e client: Handle async errors from xshm setup
XShmAttach can fail asynchronously, so we need to check the
errors in the x error handler during the XSync.
2010-08-25 12:19:46 +02:00
Alexander Larsson
7c7e3efff3 client: Don't leak xshm segments 2010-08-24 10:23:26 +02:00
Alexander Larsson
7c61dfee89 Don't try xshm any more if it fails for a permanent reason
This is copied from how Gtk+ detects Xshm failures.
2010-08-24 10:23:26 +02:00
Yonit Halperin
a960598e23 server: remove the no longer used glz drawables list that was maintained for each surface. 2010-08-24 10:10:36 +03:00
Yonit Halperin
1177718669 server: remove unnecessary dependency between surfaces and Glz drawables
Fixes freedesktop bug #28568
2010-08-24 10:10:10 +03:00
Alexander Larsson
2acc011c62 Fix mismerge in last commit 2010-08-23 16:56:17 +02:00
Alexander Larsson
0795368709 Remove USE_EXCLUDE_RGN define and !USE_EXCLUDE_RGN code 2010-08-23 16:34:41 +02:00
Alexander Larsson
7c25e23148 Remove STREAM_TRACE define and !STREAM_TRACE code 2010-08-23 16:34:41 +02:00
Yonit Halperin
f1299e0f35 Limiting video streaming to the primary surface. freedesktop bug #28088. 2010-08-23 13:31:51 +03:00
Yonit Halperin
7b7feaecdf client: Fix for clipboard sending; It wasn't thread safe. 2010-08-23 08:19:26 +03:00