Commit Graph

137 Commits

Author SHA1 Message Date
Alexander Larsson
698d0e471a 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
Alexander Larsson
f912ffbc2a Stride can be negative, so don't use size_t for it 2010-08-18 16:33:20 +02:00
Alexander Larsson
5fad948a0b Don't send padding over the network with video data 2010-07-20 11:33:57 +02:00
Alexander Larsson
11a3ec34a7 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
Yonit Halperin
6e4cd5f636 canvas_base jpeg_alpha: supply the correct size to jpeg_decoder 2010-07-15 11:50:28 +03:00
Alexander Larsson
5858552f62 Add files i forgot to commit 2010-07-09 11:57:09 +02:00
Alexander Larsson
6473932345 Make distcheck work 2010-07-08 20:20:35 +02:00
Alexander Larsson
a85b48594d 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
1989b09a5e Fix sign warnings from win32 compiler 2010-07-08 15:44:39 +02:00
Alexander Larsson
405a1f71ca Fix inclusion of common files, no need for common/ part 2010-07-08 15:44:15 +02:00
Alexander Larsson
14ceecd4e2 Simplify spice_pixman_region32_init_rects with new types
Don't manually of SpiceRects to pixman_box32_t now that they are compatible
and SpiceRect is internal.
2010-07-08 14:46:04 +02:00
Alexander Larsson
23f0b3d5b2 Make all internal structures not be packed 2010-07-08 14:30:01 +02:00
Alexander Larsson
74c767fd26 Move SpiceChunks to mem.h 2010-07-08 14:17:24 +02:00
Alexander Larsson
d1ed338483 Move in spice/draw.h from spice-protocol to common/ 2010-07-08 13:56:01 +02:00
Alexander Larsson
2b5fe8c7ac Properly parse QXLLineAttrs.style 2010-07-08 12:43:33 +02:00
Gerd Hoffmann
052c9bbbbf 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
c226eb0300 Add spice_marshaller_add_ref_chunks 2010-07-07 23:10:51 +02:00
Alexander Larsson
23ace37e71 Add spice_chunks_* helpers 2010-07-07 23:10:47 +02:00
Alexander Larsson
f564229a7f Convert SpicePath.segments to a pointer array 2010-07-05 20:45:13 +02:00
Gerd Hoffmann
1d0b18b5a3 Properly parse and marshall SpiceString 2010-07-02 16:47:51 +02:00
Alexander Larsson
b2c043c809 Fix build on win32 2010-07-01 16:46:12 +02:00
Alexander Larsson
132c9588d6 Update for the SpicePath.segments type change 2010-07-01 16:07:02 +02:00
Alexander Larsson
bb63090839 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
03a0b6741a 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
Alexander Larsson
efe133f71d Add spice_marshaller_set_uint32
With this function you can update an added uint32 after it being added.
To make this possible all the spice_marshaller_add_add_foo functions
now return a pointer that can be used as a reference when later
setting a value.
2010-06-30 22:35:17 +02:00
Gerd Hoffmann
9fcd7fa957 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
06c46357e5 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
3f12ce3c2b qxl abi: parse QXLOpaque.
Also adapt to tyops fix (s/rop_decriptor/rop_descriptor/).
2010-06-29 12:30:19 +02:00
Gerd Hoffmann
f2c7cb4122 qxl abi: parse QXLFill.
Also adapt to tyops fix (s/rop_decriptor/rop_descriptor/).
2010-06-29 12:30:19 +02:00
Alexander Larsson
831fb361fd 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
5e36912bb6 fix use-after-free in spice_marshaller_reset 2010-06-23 13:49:21 +02:00
Yonit Halperin
5ef5742843 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
fec5354016 applying zlib compression over glz on WAN connection 2010-06-21 15:05:37 +02:00
Alexander Larsson
dcc0f272e9 Make generated marshallers build on win32 2010-06-18 21:10:25 +02:00
Alexander Larsson
5e06031cad Make sound data @as_ptr to avoid copying data 2010-06-18 20:27:32 +02:00
Alexander Larsson
baebe8431a Make ping data @as_ptr to avoid copying data 2010-06-18 20:27:32 +02:00
Alexander Larsson
9b07d78152 Make cursor data @as_ptr to avoid copying data 2010-06-18 20:27:32 +02:00
Alexander Larsson
25c04403bd Make pointer types in messages be 64bit in memory
Right now we always assume pointers are stored as SPICE_ADDRESS,
i.e. 64bit, independent on the size sent on the network.
This is required for 64bit architectures of course, but slightly overkill
on 32bit architectures, so needs fixing when all SPICE_ADDRESS elements
can be made internal.
2010-06-18 20:27:32 +02:00
Alexander Larsson
2aafd286be Don't pack the message structures 2010-06-18 20:27:32 +02:00
Alexander Larsson
07fdec53e1 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
b4fb471132 Add SpiceMarshaller for easy marshalling 2010-06-18 16:32:11 +02:00
Alexander Larsson
9c5bef32b6 Client: Use the autogenerated demarshallers
When a message has been read from the network we now pass it into
the generated demarshaller for the channel. The demarshaller converts
the network data to in-memory structures that is passed on to the
spice internals.

Additionally it also:
* Converts endianness
* Validates sizes of message and any pointers in it
* Localizes offsets (converts them to pointers)
* Checks for zero offsets in messages where they are not supported

Some of this was previously done using custom code in the client, this
is now removed.
2010-06-18 16:32:11 +02:00
Alexander Larsson
4255fd5fad There are multiple line attribute flags enums, use only one 2010-06-17 11:21:03 +02:00
Alexander Larsson
1ea6a0eea6 Add spice_strnlen 2010-06-17 11:21:03 +02:00
Yonit Halperin
a23bf0c0d5 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
93fdeaa7e1 JPEG support: introducing jpeg encoding for spice bitmaps 2010-06-09 11:40:25 +02:00
Alexander Larsson
0261d7d689 Fix spelling errors in comments and strings 2010-05-21 10:51:28 +02:00
Alexander Larsson
c620859bdf Use the new byteswap macros from spice-protocol 2010-05-19 16:03:32 +02:00
Gerd Hoffmann
3bd239614e Add C version of find_msb()
This patch allows people to build the spice-client on any 32bit/64bit
architecture.

by Bryan Stillwell <bryan@bokeoa.com>
2010-05-03 11:36:59 +02:00
Alexander Larsson
e4501caa6e 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