Commit graph

25 commits

Author SHA1 Message Date
Alexander Larsson
bc792a5e0e surface: Merge scratch construction into _cairo_surface_create_scratch
We merge _cairo_surface_create_similar_scratch and
_cairo_surface_create_similar_solid into a single function named
_cairo_surface_create_scratch, to avoid confusion with
cairo_surface_create_similar which now will have a different
behaviour wrt the sizes and the device-scale.

_create_scratch assumes the width and height are in backend
coordinates, while create_similar does not.
2013-09-05 16:11:09 +01:00
Chris Wilson
a64ce09715 xlib: Trim uploads for surfaces extended by PAD
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-04-06 09:09:23 +01:00
Chris Wilson
04b9d5d9b1 xlib: Wrap errors generating sources in an error surface
Once upon a time the wrapping was provided by the caller, but the
current requirement is that the error is propagated back as an error
surface.

Bugzilla: http://bugs.freedesktop.org/show_bug.cgi?id=63196
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-04-06 09:07:24 +01:00
Chris Wilson
91834fbdee xlib/shm: Clarify testing of seqno
Rename the seqno tests into seqno_passed(), seqno_before() and
seqno_after() in order to clarify their semantics.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-29 22:26:00 +00:00
Chris Wilson
02a2baa8dc xlib/shm: Tidy creation of the proxy source for ShmPixmaps
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-29 02:51:25 +00:00
Chris Wilson
fa4f48cccb xlib: Do not upload the whole image just because we want an entire row
Fixes regression exposed by

commit a73e7ff018
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sun Jan 6 11:29:27 2013 +0000

    xlib: Simplify source creation by use of map-to-image

but ultimately from

commit 74941f8220
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Jan 2 22:27:55 2013 +0000

    xlib: Use SHM transport for ordinary image uploads

Reported-by: Gökçen Eraslan <gokcen.eraslan@gmail.com>
Reported-by: Guillaume Ayoub <guillaume.ayoub@kozea.fr>
Reported-by: Emmanuel Benisty <benisty.e@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59635
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-23 15:09:35 +00:00
Chris Wilson
6639c12310 xlib: Initialise Pixmap for proxy sources
So that we do not try to tell X to free a garbage pixmap and promptly
kill us.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-13 22:48:30 +00:00
Chris Wilson
7012334ebb xlib: Handle lack of XRenderFillRectangles
Remember to check for a supported render version before making a
FillRectangle request, and fallback to the core protocol where possible
instead.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-13 18:37:08 +00:00
Chris Wilson
dd20c1f4d6 xlib: map-to-image requires an extents
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-09 12:38:09 +00:00
Chris Wilson
a73e7ff018 xlib: Simplify source creation by use of map-to-image
We were open-coding the functionality of map-to-image inside the source
creation routines. so refactor to actually use map-to-image instead.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-06 11:30:02 +00:00
Chris Wilson
734a541dc3 xlib: Avoid copying the source twice if it is an image
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-03 15:07:18 +00:00
Chris Wilson
0bfd2acd35 xlib: Implement SHM fallbacks and fast upload paths
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-17 13:58:09 +01:00
Chris Wilson
6938592ec7 xlib: If a sample accesses outside of a repeating image, upload it all
Fixes bug-51910

Reported-by: Albertas Vyšniauskas <thezbyg@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51910
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-09 21:57:03 +01:00
Andrea Canciani
13b7364836 surface: Use the internal map/unmap
In many places Cairo maps/unmaps surfaces to perform operations on the
raw image, but it doesn't care about the format being invalid. All of
these are appropriate users of _cairo_surface_map_to_image().
2012-05-26 16:07:00 +02:00
Andrea Canciani
37c5c2dbe5 surface: Only use non-NULL extents for internal mapping
_cairo_surface_map_to_image() requires the input extents to be
non-NULL.
2012-05-26 16:06:39 +02:00
Chris Wilson
df62accbda Split cairo-surface-subsurface-private into struct+inlines
References: https://bugs.freedesktop.org/show_bug.cgi?id=48577
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-19 13:17:29 +01:00
Chris Wilson
2e7d60e0a2 Split cairo-pattern-private into struct+inlines
References: https://bugs.freedesktop.org/show_bug.cgi?id=48577
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-19 12:55:44 +01:00
Chris Wilson
8653c2692e Split cairo-recording-surface-private into struct+inlines
References: https://bugs.freedesktop.org/show_bug.cgi?id=48577
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-19 12:46:34 +01:00
Chris Wilson
2061cd81f2 Replace the ad-hoc surface unwrappers with a function pointer
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-09 13:01:17 +00:00
Chris Wilson
f308ba7a44 subsurface: Replace any existing snapshot
Only allow one owner to keep their snapshot on the subsurface, and
so automatically replace any previous snapshot.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-25 12:25:38 +00:00
Chris Wilson
6a2b754ec9 xlib: Eliminate redundant copies of subsurfaces
If the sample is wholly contained within the subsurface of the original,
we can simply use the original with an offset; thereby only copying the
data if we are sampling outside the subsurface bounds.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-23 18:40:02 +00:00
Chris Wilson
49d3a6a95e xlib: Cache the subsurface Picture
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-23 17:36:16 +00:00
Chris Wilson
894d8c8bf7 xlib: Handle subsurfaces correctly
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-23 15:40:15 +00:00
Chris Wilson
ba855a12e8 xlib-xp 2011-10-14 16:01:27 +01:00
Chris Wilson
af9fbd176b Introduce a new compositor architecture
Having spent the last dev cycle looking at how we could specialize the
compositors for various backends, we once again look for the
commonalities in order to reduce the duplication. In part this is
motivated by the idea that spans is a good interface for both the
existent GL backend and pixman, and so they deserve a dedicated
compositor. xcb/xlib target an identical rendering system and so they
should be using the same compositor, and it should be possible to run
that same compositor locally against pixman to generate reference tests.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

P.S. This brings massive upheaval (read breakage) I've tried delaying in
order to fix as many things as possible but now this one patch does far,
far, far too much. Apologies in advance for breaking your favourite
backend, but trust me in that the end result will be much better. :)
2011-09-12 08:29:48 +01:00