summaryrefslogtreecommitdiff
path: root/uxa
diff options
context:
space:
mode:
authorMatthias Hopf <mhopf@suse.de>2010-08-17 18:05:02 +0200
committerMatthias Hopf <mhopf@suse.de>2010-09-22 17:45:06 +0200
commitb84925b9c0842ba4dfa3481c09d3a80f84db4838 (patch)
tree7c448f30174e89b52ff5504b97b06ca65399e045 /uxa
parent99f8d68d3dbc54fdd7de4a6df546cfa89422a0c2 (diff)
Make driver compile for 1.6 Xserver series again.
Signed-off-by: Matthias Hopf <mhopf@suse.de>
Diffstat (limited to 'uxa')
-rw-r--r--uxa/uxa-accel.c2
-rw-r--r--uxa/uxa-render.c8
2 files changed, 10 insertions, 0 deletions
diff --git a/uxa/uxa-accel.c b/uxa/uxa-accel.c
index a2ad6511..a5066c8e 100644
--- a/uxa/uxa-accel.c
+++ b/uxa/uxa-accel.c
@@ -47,7 +47,9 @@ format_for_depth(int depth)
case 16: return PICT_r5g6b5;
default:
case 24: return PICT_x8r8g8b8;
+#if XORG_VERSION_CURRENT >= 10699900
case 30: return PICT_x2r10g10b10;
+#endif
case 32: return PICT_a8r8g8b8;
}
}
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index 3194d230..fd8eb939 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -108,6 +108,7 @@ op_to_string(CARD8 op)
/*
* Operators only available in version 0.2
*/
+#if RENDER_MAJOR >= 1 || RENDER_MINOR >= 2
C(DisjointClear);
C(DisjointSrc);
C(DisjointDst);
@@ -133,10 +134,12 @@ op_to_string(CARD8 op)
C(ConjointAtop);
C(ConjointAtopReverse);
C(ConjointXor);
+#endif
/*
* Operators only available in version 0.11
*/
+#if RENDER_MAJOR >= 1 || RENDER_MINOR >= 11
C(Multiply);
C(Screen);
C(Overlay);
@@ -152,6 +155,7 @@ op_to_string(CARD8 op)
C(HSLSaturation);
C(HSLColor);
C(HSLLuminosity);
+#endif
default: return "garbage";
#undef C
}
@@ -237,11 +241,13 @@ uxa_get_pixel_from_rgba(CARD32 * pixel,
gshift = rbits;
bshift = gshift + gbits;
ashift = bshift + bbits;
+#if XORG_VERSION_CURRENT >= 10699900
} else if (PICT_FORMAT_TYPE(format) == PICT_TYPE_BGRA) {
ashift = 0;
rshift = abits;
gshift = rshift + rbits;
bshift = gshift + gbits;
+#endif
} else {
return FALSE;
}
@@ -283,6 +289,7 @@ uxa_get_rgba_from_pixel(CARD32 pixel,
gshift = rbits;
bshift = gshift + gbits;
ashift = bshift + bbits;
+#if XORG_VERSION_CURRENT >= 10699900
} else if (PICT_FORMAT_TYPE(format) == PICT_TYPE_BGRA) {
ashift = 0;
rshift = abits;
@@ -290,6 +297,7 @@ uxa_get_rgba_from_pixel(CARD32 pixel,
rshift = PICT_FORMAT_BPP(format) - (rbits+gbits+bbits);
gshift = rshift + rbits;
bshift = gshift + gbits;
+#endif
} else {
return FALSE;
}