Commit Graph

145 Commits

Author SHA1 Message Date
Alexander Larsson
36fd22a9db Add more emacs mode headers 2010-06-22 12:03:21 +02:00
Alexander Larsson
5c05a24ba1 Convert client to use indirect calls for message marshalling
This is required to support multiple versions
2010-06-22 10:54:59 +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
25bb38f643 applying zlib compression over glz on WAN connection 2010-06-21 15:05:37 +02:00
Alexander Larsson
cfc1e95bda Make opengl optional, disabled by default
The OpenGL renderer isn't really useful right now, its not quite up
to date, its not really faster than software and it only supports a limited
subset of drivers. So, lets disable it for now.

Long term opengl rendering of the 2d part of spice is important if we want
to combine 2d and 3d rendering (say if spice adds opengl support in the
protocol). But until then this is isn't useful for normal use.
2010-06-21 14:50:18 +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
3c8cb83af5 Make cursor 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
ee91ed475d Switch client to use generated marshallers 2010-06-18 20:27:32 +02:00
Alexander Larsson
1302667662 Generate and link marshallers into client 2010-06-18 20:27:32 +02:00
Alexander Larsson
1a0b3fbdbb Generate demarshalling code on win32 too 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
17bbef4df3 Generate demarshallers in client 2010-06-18 16:32:11 +02:00
Alexander Larsson
aa6b7b5beb Use the correctly spelled enum values from the new generated enums 2010-06-18 16:32:10 +02:00
Alexander Larsson
1ba1ce52ed Use the new enums for keyboard modifier flags 2010-06-18 16:32:10 +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
3e989a361c client: Only invalidate on screen if drawing to the primary surface 2010-06-09 11:16:48 +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
012bd25779 Fix spelling errors in comments and strings 2010-05-21 10:51:28 +02:00
Gerd Hoffmann
d9084bfb64 Revert "[debug] migration troubleshooting"
This reverts commit 08927fabe5.
2010-05-19 12:09:22 +02:00
Gerd Hoffmann
08927fabe5 [debug] migration troubleshooting 2010-05-19 11:22:07 +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
fcbd3208fc client: Report window format right for win32 2010-04-29 13:34:44 +02:00
Alexander Larsson
1e4ec1f513 client: Support 16bpp pixmaps on win32 2010-04-29 13:34:16 +02:00
Gerd Hoffmann
e52974c7b4 fix two warnings 2010-04-26 14:01:37 +02:00
Alexander Larsson
a1ec6e065a Fix up win32 client with recent changes 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
774e5bd36f Client: Support pixmap format conversion in copy_pixels
In order to be able to support 16bit canvases on 32bit screens and 32bit
canvases on 16bit screens we need to handle format conversion when drawing
RedPixmaps.

The way this works now for X11 is that we only have one PIXELS_SOURCE_TYPE
for pixmaps, which always has a pixman_image_t for the data, but additionally
it has an XImage (shared mem or not) if the screen the pixmap was created
for (i.e. an explicit one or the default screen) has the same format as
the pixmap.

When we draw a pixmap on a drawable we have two variants. If the pixmap
has a XImage and it matches the format of the target drawable then we
just X(Shm)PutImage it to the drawable. If the formats differ, then we
create a temporary XImage and convert into that before drawing it to
the screen.

Right now this is a bit inefficient, because we always allocate a new
temporary image when converting. We want to add some caching here, but
at least this lets things work again.
2010-04-23 16:39:13 +02:00
Alexander Larsson
d2a2f18b6e X11 client: Add helper for XImage construction 2010-04-23 16:36:35 +02:00
Alexander Larsson
4200c66cd7 Add utility functions to create XShm images 2010-04-23 16:36:35 +02:00
Alexander Larsson
ecc51c6478 Create screen composit area in same format as window
This way we don't have to convert when drawing to it, or drawing it to
the dc.
2010-04-23 16:36:35 +02:00
Alexander Larsson
1efe358a05 Add helper to compare RedDrawable::Formats for copy compabible
Being copy compatible means the format are identical except
that some bits in the source may be ignored in the destination.
2010-04-23 16:36:35 +02:00
Alexander Larsson
5c2d9a3e32 Add RedDrawable::Format get_format()
This is useful because we can e.g. create pixmaps in the same format as
a window.
2010-04-23 16:36:35 +02:00
Alexander Larsson
cfa250caa2 Add XPlatform::get_screen_format for X11 2010-04-23 16:36:35 +02:00
Alexander Larsson
2d6fbde89b Move RedPixmap::Format to RedDrawable::Format
We need to know the format for other drawables too (like for instance
the native format of a window), so we're pushing this down.

This changes a bunch of references to be RedDrawable::, but not all.
The the old RedPixmap:: references still work, but will be phased out.
2010-04-23 16:36:35 +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
ee04978272 Add emacs modelines to more files 2010-04-23 16:36:31 +02:00
Alexander Larsson
aeab661c5d Make client start if screen is 16bpp
The current glx code is looking for a rgb32 visual and always failing
if there is none. This means not even software rendering starts up
on e.g. 16bit visuals. This commit makes it pick software fallbacks
on 16bit visuals.

Long term we need to fix the gl implementation to do 16bpp too.
2010-04-23 16:36:31 +02:00
Alexander Larsson
9c02d15396 Client: Don't die if XIM not availible 2010-04-23 16:36:31 +02:00
Alexander Larsson
43a61bb6fe Detect XShm extension sanely
The previous way XShm detection worked failed at least for me, and is
not the standard way. We now just use XShmQueryExtension and
XShmQueryVersion.
2010-04-23 16:36:31 +02:00
Alexander Larsson
5a1f8bafa0 Avoid unncessary buffer management in mjpeg decoder if possible 2010-04-14 11:41:37 +02:00
Alexander Larsson
c97116aeb9 Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
Alexander Larsson
cc9b7a21fb Fix A1 handling in RedDrawable combine_pixels.
The previous code was just busted, as apparent on e.g. the cursor
in MS Paint.
2010-04-13 11:48:13 +02:00
Alexander Larsson
3f94cad657 Use upstream name for pthreads lib and new freetype version 2010-04-12 21:43:16 +02:00
Alexander Larsson
d033a7c71e Fixed vs2008 warning 2010-04-12 21:43:16 +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
187a4230e5 Remove leftover AutoVStreamInit class 2010-04-08 17:48:40 +02:00
Alexander Larsson
de4306af33 Initialize _kill_mark so we don't get spurious valgrind warnings 2010-04-08 17:09:32 +02:00