Commit Graph

3713 Commits

Author SHA1 Message Date
Hans de Goede
0b2336cd9c Call read_from_vdi_port() from vdi_read_buf_release()
read_from_vdi_port(), called from vdagent_char_device_wakeup() may
fail to consume all data because no buffers are available in the
read_bufs ring. When this happens we would fail to ever read more data
from the agent on the guest as the port is throttled and stays throttled
until we've consumed all data from the current buffer.

This patch re-enables the call to read_from_vdi_port() from
vdi_read_buf_release(), so that we will try the read again when space
becomes available in the read_bufs ring.

Together with another nasty hack in the linux guest virtio_console
driver, where it waits for a write to be acked by the host before
continuing with the next one, this can lead to a linux guest
getting stuck / hang (until the write is read by the spice-server
which never happens becaus of the above issues).

Note that even with this patch, the guest will still gets stuck due to
a bug in watch_update_mask in spice-core in qemu, which causes writing
to the client to never resume once it blocked. A patch for this has been
submitted to qemu.
2010-10-15 10:22:37 +02:00
Hans de Goede
a52324525d server: always call read_from_vdi_port() in a while loop
read_from_vdi_port() MUST always be called in a while loop until it returns 0.

This is needed because it can cause new data available events and its
recursion protection causes those to get lost. Calling it until it returns 0
ensures that all data has been consumed.

Example scenario where we can fail to read the available data otherwise:
- server/reds.c: vdagent_char_device_wakeup get called
  by hw/spice-vmc.c because data has arrived from the guest,
- hw/spice-vmc.c: vmc_read get calls
- If the vmc_read call depletes the current buffer it calls
  virtio_serial_throttle_port(&svc->port, false)
- This causes vmc_have_data to get called, which if in the
  mean time another buffer has arrived causes
  vdagent_char_device_wakeup to gets called again
  (so recursively)
- vdagent_char_device_wakeup is protected against recursive
  calling and ignores the second call (a nasty hack)
- if no other data arrives, the arrived data will not get read
2010-10-15 10:22:37 +02:00
Hans de Goede
d37adccfa7 Don't crash when a client disconnects while there were pending writes 2010-10-15 10:22:37 +02:00
Gerd Hoffmann
97f33fa86a server: add channel notifications.
This patch adds a channel event callback to the spice core interface.
This new callback will be called for three events:

  (1) A new connection has been established.
  (2) The channel is ready (i.e. authentication is done,
      link message verification passed all tests, channel
      is ready to use).
  (3) Channel was disconnected.

Qemu will use this to send notifications to the management app.
2010-10-12 11:11:26 +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
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
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
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
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
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
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
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
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
Alon Levy
c44b6acb09 server: add vdi_port write retry timer. RHBZ 616772 2010-07-22 11:14:26 +03:00
Alexander Larsson
e24d2094a4 Don't do manual marshalling for input channel 2010-07-21 10:14:06 +02:00
Alexander Larsson
bdeae7ffb2 server: Properly order rgb for 24bit bitmaps when sending to libjpeg
SPICE_BITMAP_FMT_24BIT order is bgr, libjpeg wants rgb.
This fixes freedesktop bug #28089
2010-07-20 14:05:36 +02:00
Alexander Larsson
5f664e0ffb Don't send padding over the network with video data 2010-07-20 11:33:57 +02:00
Alexander Larsson
12b08f2c3e codegen: Various cleanups
Remove all uses of @end in the marshaller, instead just using
the C struct array-at-end-of-struct. To make this work we also remove
all use of @end for switches (making them C unions).

We drop the zero member of the notify message so that we can avoid this
use of @end for a primitive in the marshaller (plus its useless to send
over the wire).

We change the offsets and stuff in the migration messages to real pointers.
2010-07-19 16:28:22 +02:00
Alon Levy
5cc9b924cb server vdi port: prevent recursive calls to read_from_vdi_port (required for spice-vmc) 2010-07-19 10:30:48 +03:00
Gerd Hoffmann
cc5b59e0f3 add SPICE_SERVER_VERSION
Allow to ifdef features which depend on a certain libspice-server release.
2010-07-14 19:01:41 +02:00
Yonit Halperin
c90183da94 server: enabling/disabling jpeg and zlib-over-glz via spice command line args 2010-07-14 12:16:23 +03:00
Gerd Hoffmann
b1761377d1 red_glz_compress_image: lines isn't needed any more 2010-07-13 10:11:48 +02:00
Alexander Larsson
f881a896a4 Don't marshall bitmap data as pointer, instead send inline 2010-07-09 16:52:36 +02:00
Alexander Larsson
1d119d527e Use the right enum types for bitmap_data.type comparisons 2010-07-09 12:02:15 +02:00
Alexander Larsson
633e962ac3 Make tunnel support optional in client too 2010-07-08 22:25:28 +02:00
Alexander Larsson
ceff16cad6 Make distcheck work 2010-07-08 20:20:35 +02:00
Alexander Larsson
0c505931dc Missed some misspelling fixes 2010-07-08 19:20:19 +02:00
Alexander Larsson
1a6e77d6d4 Fix various misspellings
letancy -> latency
compund -> compound
SpicedSubMessage -> SpiceSubMessage
modifaiers -> modifiers
massage -> message
outgoiong -> outgoing
AlphaBlnd -> AlphaBlend
remoth -> remote
modifires -> modifiers
secore -> secure
2010-07-08 18:26:37 +02:00
Alexander Larsson
4f54596e01 server: Remove unnecessary pci id/rev checks
There is no need to check the pci ids or revisions. Thats a contract
between qemu and the driver, and spice need not care, as long as
we get the right data from qemu.
2010-07-08 15:18:43 +02:00
Alexander Larsson
c60c995e60 Make all internal structures not be packed 2010-07-08 14:30:01 +02:00
Alexander Larsson
3c0329d27f Handle the new QXLCursorHeader type 2010-07-08 13:24:15 +02:00
Alexander Larsson
aa3d3db9f4 Use QXLPHYSICAL, not SPICE_ADDRESS in qxl parser 2010-07-08 13:11:31 +02:00
Alexander Larsson
31d2d6e4e4 Properly parse QXLLineAttrs.style 2010-07-08 12:43:33 +02:00
Gerd Hoffmann
fe4f90210f remove QXLInterface->has_command()
Not used any more, zap it before rolling up a release tarball.
2010-07-08 11:56:30 +02:00
Uri Lublin
b54037a1f4 server: add missing ifdef USE_OGL (red_worker.c) 2010-07-08 11:56:17 +02:00
Gerd Hoffmann
5ac88aa79f Properly parse QXLImage to the new-world SpiceImage
SpiceImage now replaces RedImage and has all image types in it.
All image data are now chunked (and as such not copied when demarshalling).
2010-07-07 23:58:33 +02:00
Alexander Larsson
f39d64f40b Convert SpicePath.segments to a pointer array 2010-07-05 20:45:13 +02:00
Gerd Hoffmann
3764a36472 Properly parse and marshall SpiceString 2010-07-02 16:47:51 +02:00
Alexander Larsson
007d128973 Update for the SpicePath.segments type change 2010-07-01 16:07:02 +02:00
Alon Levy
2ec023b892 - fix for noopengl patch for server
I still don't have commit access (can't ssh to anarchy) so if someone could commit this (alex) thanks,

Alon

Fix for no opengl patch - required to compile the server (fixes missing symbol gl_canvas_init).
2010-07-01 10:35:46 +02:00
Yonit Halperin
37b4ae4162 fix for not clearing the cursor ring when the primary surface is destroyed
fixes a crash in qxl_soft_reset
2010-07-01 10:32:25 +02:00
Alexander Larsson
00e1caf45d Simplify SpiceLineAttr by removing unsed stuff
Also in new protocol don't send style data if not needed.
2010-06-30 22:35:17 +02:00
Alexander Larsson
62d0c076eb Automatically marshall SpiceClipRects 2010-06-30 22:35:17 +02:00
Alexander Larsson
99f581ae56 Automatically marshall SpicePath 2010-06-30 22:35:17 +02:00
Alexander Larsson
a24a8ff72a Store SpicePath segment count rather than size
Internally and in the network protocol (for the new version) we
now store the actual number of segments rather than the size of the
full segments array in bytes. This change consists of multiple changes
to handle this:

* Make the qxl parser calculate num_segments
* Make the canvas stroke code handle the new SpicePath layout.
* Fix up is_equal_path in red_worker.c for the new layout
* replace multiple calls to spice_marshall_PathSegment with a single
  spice_marshall_Path call
* Make the byte_size() array size handling do the conversion from
  network size to number of elements when marshalling/demarshalling.
* Update the current spice protocol to send the segment count rather than
  the size
* Update the old spice protocol to use the new byte_size functionallity
  to calculate the size sent and the number of elements recieved
2010-06-30 22:35:17 +02:00
Gerd Hoffmann
f87f63fdf5 qxl-abi: handle clip rect and path references.
red_parse_qxl.c starts to follow QXLPHYSICAL references and build up
data structures.  Can zap a bunch of get_virt calls in red_worker.c,
followed by cleanups.

(de-) marshaller needs updates to deal with that.  Also I suspect with
the get_virt() calls being gone we can offload more work to generated
marshaller code.

client doesn't build.
2010-06-30 22:34:57 +02:00
Gerd Hoffmann
905c6283d5 add qxl chunk parser 2010-06-30 22:34:47 +02:00
Alexander Larsson
7627fba05d server: Don't call opengl if not enabled
If USE_OGL is not defined, really don't call or link in the opengl
backend.
2010-06-29 18:32:20 +02:00
Yonit Halperin
8d21bce435 remove unnecessary send of SPICE_MSG_DISPLAY_RESET
when SPICE_MSG_DISPLAY_RESET was sent, SPICE_MSG_DISPLAY_SURFACE_DESTROY had already
been sent for all surfaces.
It also caused a client crash since DisplayChannel::handle_reset assumes that screen
exists.
2010-06-29 13:59:46 +02:00
Gerd Hoffmann
58c23b6686 qxl abi: parse QXLRect. 2010-06-29 12:30:20 +02:00
Gerd Hoffmann
4fb61b9aa5 qxl abi: parse QXLPoint & friends. 2010-06-29 12:30:20 +02:00
Gerd Hoffmann
e7ec85a08f qxl abi: parse QXLCursorCmd. 2010-06-29 12:30:20 +02:00
Gerd Hoffmann
e03e4f0fc9 qxl abi: parse QXLSurfaceCmd. 2010-06-29 12:30:20 +02:00
Gerd Hoffmann
5de492e930 qxl abi: parse QXLMessage. 2010-06-29 12:30:20 +02:00
Gerd Hoffmann
fada35a173 qxl abi: parse QXLUpdateCmd. 2010-06-29 12:30:20 +02:00
Gerd Hoffmann
b081ec4b04 qxl abi: parse QXLClip. 2010-06-29 12:30:20 +02:00
Gerd Hoffmann
948806b583 qxl abi: parse QXLLineAttr. 2010-06-29 12:30:20 +02:00
Gerd Hoffmann
49f77eec2e qxl abi: parse QXLPattern. 2010-06-29 12:30:20 +02:00
Gerd Hoffmann
4de61f2dd8 qxl abi: parse QXLBrush. 2010-06-29 12:30:20 +02:00
Gerd Hoffmann
45ba74c795 qxl abi: parse QXLQMask. 2010-06-29 12:30:20 +02:00
Gerd Hoffmann
387f80422f qxl abi: parse QXLBlackness+QXLInvers+QXLWhiteness. 2010-06-29 12:30:20 +02:00
Gerd Hoffmann
21fffa15e1 qxl abi: parse QXLText. 2010-06-29 12:30:20 +02:00
Gerd Hoffmann
b39b130a84 qxl abi: parse QXLStroke. 2010-06-29 12:30:20 +02:00
Gerd Hoffmann
c26b574b40 qxl abi: parse QXLRop3. 2010-06-29 12:30:20 +02:00
Gerd Hoffmann
dffb0401e7 qxl abi: parse QXLTransparent. 2010-06-29 12:30:20 +02:00
Gerd Hoffmann
e81c6ef7c4 qxl abi: parse QXLCopy + QXLBlend.
Also adapt to tyops fix (s/rop_decriptor/rop_descriptor/).
2010-06-29 12:30:20 +02:00
Gerd Hoffmann
63e07be145 qxl abi: add missing QXLCopyBits 2010-06-29 12:30:19 +02:00
Gerd Hoffmann
08cfd6beaf qxl abi: parse QXLOpaque.
Also adapt to tyops fix (s/rop_decriptor/rop_descriptor/).
2010-06-29 12:30:19 +02:00
Gerd Hoffmann
ef3e20e29f qxl abi: parse QXLFill.
Also adapt to tyops fix (s/rop_decriptor/rop_descriptor/).
2010-06-29 12:30:19 +02:00
Gerd Hoffmann
85155b3f44 qxl abi: parse QXLAlphaBlnd (+Compat) 2010-06-29 12:30:19 +02:00
Gerd Hoffmann
856e2ba355 qxl abi: parse QXLCompatDrawable. 2010-06-29 12:30:19 +02:00
Gerd Hoffmann
11034dda42 qxl abi: parse QXLDrawable. 2010-06-29 12:30:19 +02:00
Gerd Hoffmann
c17fdfd053 improve memory slot error logging. 2010-06-29 12:30:19 +02:00
Alexander Larsson
7e26ff3c26 Replace log4cpp with custom log function
Also prints a simpler error to stderr for WARN or above so that
we print something on the commandline if something go wrong.
2010-06-28 21:54:53 +02:00
Alexander Larsson
9655dc30e9 Remove support for clip by path
This is not supported currently anyway and was not generated before.
2010-06-24 14:30:00 +02:00
Gerd Hoffmann
b6efc72001 drop bogous get_virt_delta calls 2010-06-23 13:49:21 +02:00
Alexander Larsson
9123e24e7b Add destructor for demarshalled messages
This is required because we don't want to free messages that just
refer to the unparsed message (like SpiceMsgData).

Also, in the future we might need it for more complex demarshalling.
2010-06-22 10:53:24 +02:00
Yonit Halperin
ae1de849ac fix for not reseting client palette caches on migration 2010-06-21 15:18:46 +02:00
Yonit Halperin
537280f183 Lossy compression of RGBA images (on WAN connection)
The RGB channels are compressed using JPEG.
The alpha channel is compressed using LZ.
2010-06-21 15:18:26 +02:00
Yonit Halperin
25bb38f643 applying zlib compression over glz on WAN connection 2010-06-21 15:05:37 +02:00
Alexander Larsson
0f2e037834 Add server/demarshaller.h 2010-06-18 20:27:32 +02:00
Alexander Larsson
972951dbb7 Make sound data @as_ptr to avoid copying data 2010-06-18 20:27:32 +02:00
Alexander Larsson
4c1094acce Make all message structs internal to spice
We move all message structs from spice-protocol to spice as
we want to be able to change these as needed internally. The
on-network format is no longer defined by these structures anyway,
but rather by the spice protocol description.
2010-06-18 20:27:32 +02:00
Alexander Larsson
c553fafe4b Use generated demarshallers in server 2010-06-18 20:27:32 +02:00
Alexander Larsson
ec10a1662f Generate demarshallers on server side 2010-06-18 20:27:32 +02:00
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
04e0c6e5b2 Convert reds.c to use SpiceMarshaller 2010-06-18 20:27:31 +02:00
Alexander Larsson
8418da7ab2 Convert snd_worker.c to use SpiceMarshaller and generated marshallers 2010-06-18 20:27:31 +02:00
Alexander Larsson
cfc86f3340 Convert red_worker.c to use SpiceMarshaller for marshalling 2010-06-18 20:27:31 +02:00
Alexander Larsson
e2728082d0 Generate marshallers in server 2010-06-18 20:27:27 +02:00
Alexander Larsson
0cca1ed2af Add SpiceMarshaller for easy marshalling 2010-06-18 16:32:11 +02:00
Alexander Larsson
1ba1ce52ed Use the new enums for keyboard modifier flags 2010-06-18 16:32:10 +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
Gerd Hoffmann
b0bb395576 sound: code style fixups 2010-05-26 08:41:24 +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
d351bb35ce sound channels: restart audio on client reconnect. 2010-05-21 09:28:25 +02:00
Alexander Larsson
0b76eae6eb Change leftover VD_INTERFACE_RECORD to SPICE_INTERFACE_RECORD 2010-05-19 14:55:41 +02:00
Alexander Larsson
2f10d6db46 Add missing backslash continuation in makefile 2010-05-19 12:30:00 +02:00
Gerd Hoffmann
d9084bfb64 Revert "[debug] migration troubleshooting"
This reverts commit 08927fabe5.
2010-05-19 12:09:22 +02:00
Gerd Hoffmann
f67b2e7488 complete NetWireInterface redesign, make red_tunnel_worker.c build. 2010-05-19 11:44:40 +02:00
Gerd Hoffmann
9204a5903a add spice-experimental.h
Supposed to be used for work-in-progress bits,
where interfaces are not finalized yet.

Moved over vdi port interface, tunnel interface
and spice client migration functions.
2010-05-19 11:22:08 +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
3f4d6c6ad6 vd_interface.h cleanups.
Drop leftover bits which are not used any more.
Rename DrawArea to QXLDrawArea.
2010-05-19 11:22:07 +02:00
Gerd Hoffmann
5b0bc279c9 NetWireInterface: redesign 2010-05-19 11:22:07 +02:00
Gerd Hoffmann
a8419b00dc zap MigrationInterface
Remove remaining MigrationInterface bits.
2010-05-19 11:22:07 +02:00
Gerd Hoffmann
cb5f500aa6 migration: new api
Add new API for migration, based on what RHEL-6 has.
2010-05-19 11:22:07 +02:00
Gerd Hoffmann
08927fabe5 [debug] migration troubleshooting 2010-05-19 11:22:07 +02:00
Gerd Hoffmann
2303568581 zap migration code
Drop all code which depends on accessing the migration file handle.
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
3cffcf98a1 kill spice_server_set_mouse_absolute
Not needed.  Just register/unregister the tablet interface instead.
2010-05-19 11:22:07 +02:00
Gerd Hoffmann
ccfbbae513 vdi port: redesign.
Pretty straight forward.

One thing we should think about is if and how we are going to deal
with multiple ports here?

With vdi port using virtio-serial as communication channel to the guest
it is easy to have multiple ports, i.e. we might want to use a second
instance for clipboard data.  That implies that we need support for
multiple channels all the way through the stack ...
2010-05-19 11:22:07 +02:00
Gerd Hoffmann
2e47435ecb constify SpiceBaseInterface 2010-05-19 11:22:07 +02:00
Gerd Hoffmann
6fdcb9310d SoundInterfaces: redesign 2010-05-19 11:22:07 +02:00
Gerd Hoffmann
4701a063da TabletInterface: redesign 2010-05-19 11:22:07 +02:00
Gerd Hoffmann
d3735feea6 QXL: redesign. 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
58273e3a32 MouseInterface: redesign 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
4461c74918 KeyboardInterface: redesign.
This is the direction I wanna take with all interfaces:  Clearly
separate interface (aka version information and function pointers)
and state information.  SpiceKbdInterface defines the interface,
SpiceKbdInstance maintains per-instance state information.  Keyboard
hasn't much beside a pointer to SpiceKbdInterface, for other
interfaces this very likely will be different.
2010-05-19 11:22:06 +02:00
Gerd Hoffmann
10e6d8b53c s/CoreInterface/SpiceCoreInterface/ 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
30c740201d VDInterface: redesign.
VDInterface has been renamed to SpiceBaseInterface. Dropped base_version
element, shlib versioning should be used instead.  Dropped id element,
it is passed to spice_server_add_interface() instead.  Now
SpiceBaseInterface has static information only, multiple interface
instances can share it.

Added SpiceBaseInstance struct for maintaining per-instance state
information.  Adapted spice_server_{add,remove}_interface() functions
to the new world.
2010-05-19 11:22:06 +02:00
Gerd Hoffmann
a97875bc3f minor timer interface cleanups.
Make the timer interface largely look like the watch interface.
Simliar naming convention for the functions (timer_*) and a
opaque SpiceTimer type.
2010-05-19 11:22:06 +02:00
Gerd Hoffmann
536212322b new watch api: kill old api 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
a5145cc93e new watch api: switch channels 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
e8a2cca026 new watch api: switch sound 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
614fa00903 new watch api: switch migration 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
5549de4b10 new watch api: switch inputs 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
d54f1103fa new watch api: switch ssl accept 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
2dda5683b6 new watch api: switch main channel 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
1a69ea6627 new watch api: switch liasync read 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
d1ab29c1af new watch api: switch listening sockets 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
4c67874a6d introduce new watch api
This patch adds a new file handle watch interface to libspice, featuring
three callbacks:

  (1) watch_add() -- create a new file watch.
  (2) watch_update_mask() -- change event mask.  spice frequently
                             enables/disables write notification.
  (3) watch_remove() -- remove a file watch.

libspice users must implement these functions to allow libspice
monitoring file handles.

The old interface (set_file_handlers) doesn't explicitly express the
lifecycle of a watch.  Also it maps 1:1 to a qemu-internal function.
In case the way qemu implements file watches changes (someone sayed
QemuIONotifier?) this will break horribly.  Beside that it is very
bad style.

Follwing patches will switch over users one by one to the new interface
and finally zap the old one.
2010-05-19 11:22:06 +02:00
Gerd Hoffmann
91f747ea1d fix visibility 2010-05-19 11:22:05 +02:00
Gerd Hoffmann
fe8b838341 zap CoreInterface->{term_printf,log}
Was used to print stuff to the qemu monitor.
Fundamentally incompatible with QMP.  Remove.
2010-05-19 11:22:05 +02:00
Gerd Hoffmann
3f7ea8e7a4 zap qterm interfaces
old way to handle monitor, obsolete.
2010-05-19 11:22:05 +02:00
Gerd Hoffmann
881c685f90 zap CoreInterface->(un)register_change_notifiers()
spice_server_add_interface() and spice_server_remove_interface()
can be used instead.
2010-05-19 11:22:05 +02:00
Gerd Hoffmann
df95728bf0 zap CoreInterface->next()
Interfaces must be registered after spice_server_init().
The "next" callback is used to discover interfaces
registered before spice_server_init().  Which is a empty
list and thus pretty pointless.  Remove it.
2010-05-19 11:22:05 +02:00
Gerd Hoffmann
43caec519e channel security cleanup
- drop spice_channel_name_t enum, use spice-protocol defines instead.
- switch spice_server_set_channel_security() channel parameter from
  enum to string.
- drop spice_server_set_default_channel_security(), use
  spice_server_set_channel_security with channel == NULL instead.
2010-05-19 11:22:05 +02:00
Gerd Hoffmann
edc1af5f67 zap spice_parse_args + spice_usage_str
First step to throw out the old interface.
2010-05-19 11:22:05 +02:00
Alexander Larsson
25bca7a286 Minor whitespace cleanup 2010-05-19 11:13:47 +02:00
Alexander Larsson
ee1e60c4a0 Make it --enable-tunnel work 2010-05-19 11:13: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
Dan Kenigsberg
270328e5c0 spice server: fix typo in private key error message 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
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
Alexander Larsson
1f51697852 Rename symbols that were changed in spice-protocol
This is an automatic change using:
$ find -name "*.[ch]" | xargs ../spice-protocol/rename-identifiers.sh ../spice-protocol/renames
$ find -name "*.cpp" | xargs ../spice-protocol/rename-identifiers.sh ../spice-protocol/renames
2010-02-04 18:49:00 +01:00
Alexander Larsson
3d84818a7b Depend on spice-protocol module
This doesn't actually use the new module, just sets it up for use.
2010-02-04 16:54:17 +01:00
Izik Eidus
2ba69f9f88 libspice: add surface 0 support
This include alot of infestracture for off screens.

Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-01-28 04:46:29 +02:00
Yonit Halperin
3eae1c80d9 server,client: server authentication for secured channels.
3 available mechanisms:  by public key, by host name, and by certificate subject name.
In the former method, chain of trust verification is not performed.
The CA certificate files are looked for under <spice-config-dir>/spice_truststore.pem

windows <spice-config-dir>=%APPDATA%\spicec\
linux <spice-config-dir>=$HOME/.spicec/
2010-01-11 19:10:54 +02:00
Yaniv Kamay
81945d8971 server: add new vd interface QTerm2Interface 2010-01-06 19:05:36 +02:00
Izik Eidus
3e1d328e37 spice: fix server crush in case connecting without qxl device
Signed-off-by: Izik Eidus <ieidus@redhat.com>
2009-12-24 00:26:52 +02:00
Izik Eidus
cb0cd69933 spice: fix ssl compiling errors
(openssl api was changed, so lets have ifdef to compile in all cases)

Signed-off-by: Izik Eidus <ieidus@redhat.com>
2009-12-22 21:39:17 +02:00
Yaniv Kamay
aa1481378f spice: sever: increase client timeout
Increase client timeout in order to prevent unnecessary
disconnecting of client while the connection is over WAN.

Tested by changing WinXP resolution (with desktop background) while
connecting over WAN (1.5Mbit 150Kbit)
2009-12-21 19:24:47 +02:00
Yaniv Kamay
31dff987ec spice: sever: remove assert on nop copy bits 2009-12-21 13:28:15 +02:00
Yonit Halperin
00d5bf8b95 spice server: heuristic for distinguishing between "real" videos and textual streams 2009-11-30 18:45:06 +02:00
Izik Eidus
a70110c4e5 spice: server: add memslots support.
Signed-off-by: Izik Eidus <ieidus@redhat.com>
2009-11-23 20:54:11 +02:00
Izik Eidus
4c72ba138c spice server: fix gl
red_worker: put invalidate at the right places

Signed-off-by: Izik Eidus <ieidus@redhat.com>
2009-11-09 17:41:30 +02:00
Yaniv Kamay
c12c3facbd fix build on Debian 2009-10-26 23:30:41 +02:00
Yonit Halperin
ef213c66c1 tunnel 2009-10-18 17:42:37 +02:00
Yaniv Kamay
c1b79eb035 fresh start 2009-10-14 15:06:41 +02:00