summaryrefslogtreecommitdiff
path: root/src/sna/fb
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-10-24 08:02:50 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-10-24 08:04:27 +0100
commit8df8618c62c0918416ca3e21b081299eacb9b054 (patch)
tree2841e547029d3e1a82097047dc7f276cd75a353e /src/sna/fb
parenta8d1eaf6ee1fed0aeff681d33864e17cb904ddd3 (diff)
sna: Adapt to changes in internal render API in Xorg-1.17
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/fb')
-rw-r--r--src/sna/fb/fbpict.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/sna/fb/fbpict.c b/src/sna/fb/fbpict.c
index 906a5f31..abe223f3 100644
--- a/src/sna/fb/fbpict.c
+++ b/src/sna/fb/fbpict.c
@@ -156,6 +156,16 @@ create_conical_gradient_image(PictGradient * gradient)
gradient->nstops);
}
+static inline bool
+picture_has_clip(PicturePtr p)
+{
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,16,99,1,0)
+ return p->clientClip;
+#else
+ return p->clientClipType != CT_NONE;
+#endif
+}
+
static pixman_image_t *
create_bits_picture(PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
{
@@ -180,7 +190,7 @@ create_bits_picture(PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
* only set the clip region for pictures with drawables
*/
if (has_clip) {
- if (pict->clientClipType != CT_NONE)
+ if (picture_has_clip(pict))
pixman_image_set_has_client_clip(image, TRUE);
if (*xoff || *yoff)