Commit Graph

106 Commits

Author SHA1 Message Date
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
ae4436215c Make generated marshallers build on win32 2010-06-18 21:10:25 +02:00
Alexander Larsson
972951dbb7 Make sound data @as_ptr to avoid copying data 2010-06-18 20:27:32 +02:00
Alexander Larsson
4ce4364f84 Make ping data @as_ptr to avoid copying data 2010-06-18 20:27:32 +02:00
Alexander Larsson
3c8cb83af5 Make cursor data @as_ptr to avoid copying data 2010-06-18 20:27:32 +02:00
Alexander Larsson
0b82006733 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
3a07edb4af Don't pack the message structures 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
0cca1ed2af Add SpiceMarshaller for easy marshalling 2010-06-18 16:32:11 +02:00
Alexander Larsson
4154d70289 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
ef8a8dae07 There are multiple line attribute flags enums, use only one 2010-06-17 11:21:03 +02:00
Alexander Larsson
1d1792c217 Add spice_strnlen 2010-06-17 11:21:03 +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
Alexander Larsson
012bd25779 Fix spelling errors in comments and strings 2010-05-21 10:51:28 +02:00
Alexander Larsson
45e62d5368 Use the new byteswap macros from spice-protocol 2010-05-19 16:03:32 +02:00
Gerd Hoffmann
a5cf90922e 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
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
7dddbfe488 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
42e83e3843 Add support for SPICE_IMAGE_FLAGS_HIGH_BITS_SET 2010-04-28 15:43:41 +02:00
Alexander Larsson
bc6029d0b0 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
ac5535048c Fix line lengths and tabs 2010-04-28 12:00:25 +02:00
Gerd Hoffmann
e52974c7b4 fix two warnings 2010-04-26 14:01:37 +02:00
Alexander Larsson
16328d2035 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
b2165b4d04 Win32 canvas fixes 2010-04-23 16:41:47 +02:00
Alexander Larsson
810caf0e77 Support alpha surface sources and destinations 2010-04-23 16:41:47 +02:00
Alexander Larsson
1a590c50c0 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
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
Alexander Larsson
619c37af17 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
6dc52f1389 Add pixman utilities for bitmap to pixman_image_t conversion 2010-04-23 16:36:32 +02:00
Alexander Larsson
8bd1a87370 Add support for 16bit rop3 2010-04-23 16:36:31 +02:00
Alexander Larsson
f5b00cdd6c Remove unused method canvas_surf_to_invers 2010-04-23 16:36:31 +02:00
Alexander Larsson
36f7c3b1e3 Fix warnings breaking win32 build 2010-04-23 16:36:31 +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
ee035787ef Fix win32 build with pixman 0.18.0 2010-04-12 21:43:15 +02:00
Izik Eidus
85d4355d79 fix 16bpp support on cairo_canvas
Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-12 11:57:34 +03:00
Alexander Larsson
063af4a4f3 Always tread depth 24 (i.e. non alpha) as depth 32 when blitting
When blitting we don't really care about alpha mismatches, we just copy bits
anyway.
2010-04-12 10:32:25 +02:00
Izik Eidus
22d1ac9eb5 spice: win32 client: fix gdi locking
While the fix could have been more effective,
it seems like this patch stream better with the coding
logic that was there..., maybe later we will want to change
the locking into more effective way.

(There is just the primary surface to protect in reiality)

Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-09 05:09:02 +03:00
Alexander Larsson
de4306af33 Initialize _kill_mark so we don't get spurious valgrind warnings 2010-04-08 17:09:32 +02:00
Alexander Larsson
601509e5f8 Remove non-used lookup3.[ch] 2010-04-07 09:40:21 +02:00
Izik Eidus
e1a4d91896 spice: common: gdi_canvas fix gdi objects leak
BitmapMask was used by the draw_text function as well
therefore we need to mark from_surface = 0 if we want
it to release the boject...

(Was evil, took me few hours to understand from where
 the leak come...)

Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-05 22:57:37 +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
Alexander Larsson
ce0d8a094c Add spice_strndup
Also, make str(n)dup handle NULL correctly
2010-03-24 17:02:20 +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
Alexander Larsson
da21e89daa Use nearest scaling for DRAW_ALPHA_BLEND since this is what win32 needs
DrvAlphaBlend is the only current user of DRAW_ALPHA_BLEND, and its
defined to do nearest (COLORONCOLOR) scaling, not bilinear.
2010-03-17 20:08:59 +01:00
Alexander Larsson
6664c12278 Fix up empty region checks in canvas operations
We rely on not passing on empty rects to the drawing operations by
checking for empty regions and exiting early. However the checks
were wrongly using pixman_region32_n_rects(region) == 0, whereas
we should be using pixman_region32_not_empty().
2010-03-17 10:06:40 +01:00
Alexander Larsson
af4672326b Use the spice allocator in common/ 2010-03-11 12:14:08 +01:00