Commit Graph

552 Commits

Author SHA1 Message Date
Alexander Larsson
37c5bc577d Update NEWS for release 2010-09-29 18:22:07 +02:00
Alexander Larsson
e5474684d5 client: Avoid crash if platform_win is NULL
This is a temporary fix as this will be fixed for real when
the cut and paste patches land.
2010-09-29 17:48:28 +02:00
Alexander Larsson
92d286c6b5 client: Re-enable USE_XRANDR_1_2
This was disabled by mistake before.
2010-09-29 15:08:05 +02:00
Alexander Larsson
d8faf813e7 client: Don't hardcode -lrt
-lrt is already included in SPICE_NONPKGCONFIG_LIBS if needed so no
need to add it to the command line manually.
2010-09-29 13:37:48 +02:00
Alexander Larsson
3f3283ee17 client: Fall back to gettimeofday if clock_gettime not found 2010-09-29 13:35:18 +02:00
Alexander Larsson
93dc13c91a client: Include config.h from common.h
config.h should be availible everywhere, so move its inclusion
to the top of common.h.
2010-09-29 13:26:21 +02:00
Alexander Larsson
44631aa023 client: Check for pthread yield function using autoconf 2010-09-29 13:16:45 +02:00
Alexander Larsson
1670b220b5 Initialize variable to avoid compiler warning
Seems the OSX gcc warns on saveRight not being initialzied.
2010-09-29 12:47:15 +02:00
Alexander Larsson
8e14489621 client: Include stdint.h for uint32_t 2010-09-29 12:44:33 +02:00
Alexander Larsson
2626419da6 client: Don't use basename for argv[0] in --help output
This isn't what other apps do, and it had issues in the OSX port,
so just remove this.
2010-09-29 12:40:48 +02:00
Alexander Larsson
a5abceccb2 Fix warning from OSX compiler
The OSX compiler warns about uninitialized variable, so we change
a bit how size is initialized.
2010-09-29 12:36:39 +02:00
Alexander Larsson
c425ed626c Handle surface images in DrawOpaque 2010-09-22 14:36:40 +02:00
Alexander Larsson
587584a4e4 server: Handle self_image in localize_bitmap
When drawing a drawable with a NULL src bitmap that means we should
be using the previously generated self_bitmap. Not doing this causes
a segfault due to accessing the NULL.
2010-09-21 20:14:50 +02:00
Alexander Larsson
485ba90b03 server: Handle NULL image in red_update_streamable
A NULL src bitmap means self_bitmap, which is not a stream, so abort.
2010-09-21 20:12:51 +02:00
Alexander Larsson
763e05ee30 server: Use the right image size for self_bitmap
The self_bitmap is the size of self_bitmap_area, not the bbox.
This is especially important since we later copy the self_bitmap_area
into the new bitmap, and if that is larger than bbox then we will
overwrite random memory.
2010-09-21 20:11:18 +02:00
Alexander Larsson
5322d43146 server: Don't leak QUIC image chunks
red_put_image() needs to free the chunks for QUIC images, as we
allocate these when creating the image.
2010-09-21 20:09:59 +02:00
Alexander Larsson
1cd8076415 Fix crash when resetting pixman image transform
Resetting the transform is done by setting it to the identity
transform, not passing in NULL. Passing in NULL causes a crash.
2010-09-21 20:08:46 +02:00
Alexander Larsson
a5ce2c0edb server: Ensure we flush the release pipe after an oom
We really need to flush the ring to ensure that we push something on the
release ring. If we don't do this and the ring is not pushed for other
reasons we will timeout in the guest driver waiting for the ring.
2010-09-20 13:30:01 +02:00
Alexander Larsson
2f76d8e974 Release more drawables on OOM
We've changed how resources are released so they are now being
freed continuosly, rather than on OOM, since we want to free as early
possible to avoid fragmentation. So, OOM situations should be a bit
less common now and signify a real memory shortage, so we should try
to free up more resources.
2010-09-20 13:30:01 +02:00
Gerd Hoffmann
69bad628cc fix palette handling for 0.4 compat
spice 0.4 guests pass 16bpp palette colors when running in
a 16bpp video mode.  Convert them to 32bpp.
2010-09-14 10:44:22 +02:00
Gerd Hoffmann
f7aa863d54 fix brush handling for 0.4 compat
spice 0.4 guests pass 16bpp colors for brushes when running in
a 16bpp video mode.  Convert them to 32bpp.
2010-09-14 10:43:16 +02:00
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