Commit Graph

124 Commits

Author SHA1 Message Date
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
Alexander Larsson
32dede532b win32 client: Remove unnecessary GDIImage type
We just use pixman_image_t as the "information about image data" structure.
2010-04-29 11:40:07 +02:00
Alexander Larsson
2bb0187ad8 Add support for SPICE_IMAGE_FLAGS_HIGH_BITS_SET 2010-04-28 15:43:41 +02:00
Alexander Larsson
2a4015bf8d Clear alpha in xRGB destination to avoid pixman setting it to 0xff
Pixman sometimes sets the ignored high byte to 0xff during alpha
blending. This is correct according to pixman specs, as the high
byte is ignored. However its not what windows expects, and it causes
unnecessary regions with non-zero high byte, causing us to
send rgba data instead of rgb which compresses worse.

So, we detect this and clear the high byte.
2010-04-28 12:15:24 +02:00
Alexander Larsson
24bb8137ea Fix line lengths and tabs 2010-04-28 12:00:25 +02:00
Gerd Hoffmann
a0b1c5171e fix two warnings 2010-04-26 14:01:37 +02:00
Alexander Larsson
8650d04aee Remove surface format workaround now that win32 driver is fixed
The win32 driver makes all 32bit surfaces be xRGB now, so we
can remove this old workaround.
2010-04-23 21:02:59 +02:00
Alexander Larsson
ec9069c84b Win32 canvas fixes 2010-04-23 16:41:47 +02:00
Alexander Larsson
39969cea2f Support alpha surface sources and destinations 2010-04-23 16:41:47 +02:00
Alexander Larsson
c9a827ffd1 Localize palettes for LZ PLT format
This is needed since they always decode to 32bit mode.
2010-04-23 16:41:47 +02:00
Alexander Larsson
afea49d3c5 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
5a76ba473b 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
Alexander Larsson
a8db70075a common: Add lookaside storage for pixman image format
Ideally we should just read this from the pixman image, but
there is no API to do so in stable pixman, so we store it.
2010-04-23 16:36:35 +02:00
Alexander Larsson
4a38b86c69 Add pixman utilities for bitmap to pixman_image_t conversion 2010-04-23 16:36:32 +02:00