Commit Graph

102 Commits

Author SHA1 Message Date
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
Alexander Larsson
18485cef06 Free the jpeg decoder with the stream 2010-04-08 16:35:10 +02:00
Alexander Larsson
5059c304be Use libjpeg to decode mjpegs, not ffmpeg
This is pretty straightforward, although there are two weird issues.
The current encoder has two bugs in the yuv conversion. First of all
it switches red and blue, due to something of an endianness issue. We
keep this behavior by switching red and blue. Maybe we want to
change this in the new protocol version since switching this may
cause jpeg compression to be worse.

Secondly, the old coder/decoder did rgb to/from yuv420 wrongly for
jpeg, not using the "full scale" version of Y that is used in jpeg,
but the other one where y goes from 16 to 235. (See jpeg/jfif
reference on http://en.wikipedia.org/wiki/YCbCr for details.)
The new decoder uses the full range in order to get better quality,
which means old encoders will show slightly darker images.

This completely removes all ffmpeg usage in the client
2010-04-08 11:30:18 +02:00
Alexander Larsson
ed568302ad Update project file to visual studio 2008 2010-04-08 09:30:16 +02:00
Yonit Halperin
88aa56045a client: handling SPICE_MSG_MAIN_MIGRATE_SWITCH_HOST
disconnecting from the current host and connecting to the target host.
2010-04-06 14:56:46 +02:00
Yonit Halperin
91bc0e8625 client: fix unsafe access to an event member 2010-04-06 11:34:21 +02:00
Yonit Halperin
6f40c593e9 client: x11: fix a crash caused by a call to a destroyed window.
Happens when a focused window is destroyed without a focus out event,
and a focus-in event occurs on another window.
2010-04-03 05:55:00 +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
Alon Levy
77f6d70541 spice: client: fix handling of top down images in video streams
Top down streams arrive from x11-qxl driver.
2010-03-24 15:23:20 +01:00
Alexander Larsson
1c98a3536b configure.ac: client: replace $(top_srcdir) in x11/Makefile.am (subdir config)
Replace all "$(top_srcdir)/common" with "$(SPICE_COMMON_DIR)"
and     all "$(top_srcdir)/client" with custom "$(CLIENTDIR)"

This would (after following patches) enables building the client from
either spice/ (top directory) or spice/client.
2010-03-24 15:04:30 +01:00
Yonit Halperin
457693fcfa client: add command line support for ciphers, ca file, and host certificate subject 2010-03-18 10:21:47 +01:00
Søren Sandmann Pedersen
46ad8fd070 Explicitly depend on various X libraries, and -pthread
In Fedora 13, the linker doesn't pull in DT_NEEDED libraries anymore,
so we have to list the things that we depend on explicitly.

This affects several X extension libraries, and also the pthread
library.
2010-03-11 06:37:41 -05: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
22b551f97f Define __STDC_LIMIT_MACROS for c++ code to get SIZE_MAX
We need SIZE_MAX for the malloc overflow code, and its not defined
in C++ unless __STDC_LIMIT_MACROS is defined.
2010-03-10 21:28:48 +01:00
Alexander Larsson
0230541af5 Define GL_GLEXT_PROTOTYPES in CFLAGS not in random places in the source 2010-03-10 21:28:47 +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
18606d99ea Move canvas_region and group_start/end to canvas_base 2010-03-08 19:45:28 +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
c0fdcd1a10 Make canvas Glz decoder integration nicer
We use a dynamic interface similar to e.g. SpiceImageCache instead
of passing both function and opaque
2010-03-08 19:45:27 +01:00
Alexander Larsson
4f097150cb Fix up win32 build reference to pixman_utils.cpp
It was pointing to the wrong directory for pixman_utils.cpp
2010-03-05 17:17:23 +01:00
Alexander Larsson
2d203bc428 Only use AI_ADDRCONF if availible
AI_ADDRCONF not availible on winXP, so this fixes windows build.
2010-03-03 16:14:19 +01:00
Larsson@.(none)
d425690875 Update visual studio project for pixman changes 2010-03-01 15:12:37 +01:00
Larsson@.(none)
c28169976a Make gdi canvas build in the new pixman world 2010-03-01 15:12:35 +01:00
Gerd Hoffmann
872be6b2d7 spice client: add ipv6 support.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2010-02-27 22:12:08 +02:00
Gerd Hoffmann
878c215501 spice client: fix dns lookup
ignore lookup results which are not ipv4

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2010-02-27 22:08:47 +02:00
Alexander Larsson
239b2b66b2 Remove qcairo dependency, only use pixman 2010-02-23 22:52:06 +01:00
Alexander Larsson
295738b453 Remove cairo use in client 2010-02-23 22:52:06 +01:00
Alexander Larsson
1caa4b65c5 Remove no longer needed CAIRO_CANVAS_CACH_IS_SHARED define and code 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
7537acd630 Add optional templated base class to Cache and SharedCache
We want this for integration with C-style classes.
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
b82f9ed2b3 Fix delete vs delete[] mismatches
This fixes a bunch of valgrind warnings.
2010-02-10 11:25:28 +01:00
Alexander Larsson
39be5a8b13 Use standard int types and <spice/types.h> 2010-02-04 18:49:05 +01:00
Alexander Larsson
90104b39ae Revert automatic renames that were wrong
Seems my rename script didn't handle C++ namespaces that well.
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
Alexander Larsson
a8ffd12e99 Filter out XIM X events
XIM ClientMessage events to an XIM internal window was triggering
the check for a window message procs. We need to properly filter
events with XFilterEvent to avoid this happening.
2010-02-04 16:11:38 +01:00
Yaniv Kamay
8ceb531958 client: add Platform::term_printf
Platform::term_printf is a variant of printf that
on windows dynamically opens console in order to
have visible output during command line processing.
2010-01-11 19:57:29 +02:00