Commit Graph

72 Commits

Author SHA1 Message Date
Alexander Larsson
ffb7e07c4b Fix warnings breaking win32 build 2010-04-23 16:36:31 +02:00
Izik Eidus
85cb44a94b 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
8974315747 Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
Alexander Larsson
5395606592 Fix win32 build with pixman 0.18.0 2010-04-12 21:43:15 +02:00
Izik Eidus
2a725d3b42 fix 16bpp support on cairo_canvas
Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-12 11:57:34 +03:00
Alexander Larsson
347f9598dc 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
7977a00187 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
badb8b3bc0 Initialize _kill_mark so we don't get spurious valgrind warnings 2010-04-08 17:09:32 +02:00
Alexander Larsson
9c54b0c0b6 Remove non-used lookup3.[ch] 2010-04-07 09:40:21 +02:00
Izik Eidus
4ee6e1ac88 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
519e8dcd55 libspice: add off screens support
Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-03 05:35:31 +03:00
Alexander Larsson
184c8cbe54 Add spice_strndup
Also, make str(n)dup handle NULL correctly
2010-03-24 17:02:20 +01:00
Alexander Larsson
3e6a25dc7c Fix uninitilized memory read in stroke_fill_spans()
y2 was not initialized
2010-03-18 10:40:18 +01:00
Alexander Larsson
b83f707c7a 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
6b599f4147 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
021f0514e4 Use the spice allocator in common/ 2010-03-11 12:14:08 +01:00
Alexander Larsson
c22788cd26 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
2fd0eebd69 Define GL_GLEXT_PROTOTYPES in CFLAGS not in random places in the source 2010-03-10 21:28:47 +01:00
Alexander Larsson
6385dc082c Update gdi canvas wrt latest changes
ALIGN -> SPICE_ALIGN
2010-03-09 16:01:12 +01:00
Alexander Larsson
3fbcfc1185 Use macros from <spice/macros.h> rather than duplicate them 2010-03-09 11:10:00 +01:00
Alexander Larsson
fe0e853cb7 Move draw_rop3 to canvas_base 2010-03-08 19:45:28 +01:00
Alexander Larsson
6522564e0d Move canvas_draw_stroke to canvas_base 2010-03-08 19:45:28 +01:00
Alexander Larsson
82a7c42a86 Move most of the shared draw_xyz() methods from CairoCanvas to CanvasBase
This adds a set of virtual methods for low-level operations. A subclass
can choose to implement those and let the default CanvasBase implementations
handle the highlevel stuff.
2010-03-08 19:45:28 +01:00
Alexander Larsson
afc7618b6a Move canvas_region and group_start/end to canvas_base 2010-03-08 19:45:28 +01:00
Alexander Larsson
5fe1ef371c 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
c0012a91ce Make virt mapping an interface 2010-03-08 19:45:28 +01:00
Alexander Larsson
4a0cb79982 Make glz_decoder non-optional canvas_base in canvas constructors
It can still be NULL, but we simplify the headers by always including it.
There is no practical performance difference here.
2010-03-08 19:45:27 +01:00
Alexander Larsson
ccbd520e4a 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
acd6262480 Fix colorkeying in pixman_utils.c
We were masking out the alpha bit in the key color not int
the source pixel, so colorkeying didn't work when the high byte
was != 0. For instance in the shutdown dialog in XP.
2010-03-08 19:41:34 +01:00
Larsson@.(none)
1f08b3866f Make gdi canvas build in the new pixman world 2010-03-01 15:12:35 +01:00
Larsson@.(none)
1afe879741 Always include spice/types.h before pixman so standard int types exist 2010-03-01 15:12:33 +01:00
Larsson@.(none)
9344743555 Fix warnings from visual studio compiler 2010-03-01 15:12:32 +01:00
Larsson@.(none)
15f932d3ff Have only one copy of ROUND macro and cast to int explicitly 2010-03-01 15:12:30 +01:00
Alexander Larsson
026463bd1c Remove last cairo use from canvas_base 2010-02-23 22:52:06 +01:00
Alexander Larsson
dada46a54a Remove cairo_t from cairo canvas 2010-02-23 22:52:06 +01:00
Alexander Larsson
79e407f558 Covert cairo canvas put_image() to pixman 2010-02-23 22:52:06 +01:00
Alexander Larsson
46d18ce680 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
1fcda9f28a Convert cairo canvas clear() to pixman 2010-02-23 22:52:06 +01:00
Alexander Larsson
d07c401de4 Convert cairo canvas group_start/end to pixman 2010-02-23 22:52:06 +01:00
Alexander Larsson
69fc5f57a7 Convert cairo canvas read_bits() to pixman 2010-02-23 22:52:06 +01:00
Alexander Larsson
b8d6bbca84 Remove unused cairo helper functions 2010-02-23 22:52:06 +01:00
Alexander Larsson
b02c4d8dbf Convert cairo canvas to use pixman for draw_stroke 2010-02-23 22:52:06 +01:00
Alexander Larsson
28976efefb Convert cairo canvas draw_transparent to use pixman 2010-02-23 22:52:06 +01:00
Alexander Larsson
f84c5f361e Convert cairo canvas draw_rop3 to using pixman 2010-02-23 22:52:05 +01:00
Alexander Larsson
dc047d0d06 Convert draw_blackness/whiteness/invers to using pixman 2010-02-23 22:52:05 +01:00
Alexander Larsson
6d5ed0eb6f Convert cairo canvas alpha_blend to using pixman 2010-02-23 22:52:05 +01:00
Alexander Larsson
7512c3951f Convert cairo canvas draw_text to using pixman 2010-02-23 22:52:05 +01:00
Alexander Larsson
4d78427363 Convert cairo canvas copy bits to pixman 2010-02-23 22:52:05 +01:00
Alexander Larsson
800cfdd4b8 Convert cairo canvas draw_copy() to using pixman
This is just identical to draw_blend().
2010-02-23 22:52:05 +01:00
Alexander Larsson
32970dd0ef Convert cairo canvas draw_blend() to using pixman 2010-02-23 22:52:05 +01:00