[cairo] [PATCH 4/6] xcb: Add switches for whether XRender supports GOOD/BEST filtering
Bill Spitzak
spitzak at gmail.com
Thu Oct 9 19:46:14 PDT 2014
Currently these are always false, but if XRender use a pixman that
supports filtering these could be turned on for that version.
---
src/cairo-xcb-connection.c | 10 ++++++++++
src/cairo-xcb-private.h | 6 +++++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/src/cairo-xcb-connection.c b/src/cairo-xcb-connection.c
index b48add1..2d51e14 100644
--- a/src/cairo-xcb-connection.c
+++ b/src/cairo-xcb-connection.c
@@ -77,6 +77,8 @@ typedef struct _cairo_xcb_xid {
#define XCB_RENDER_HAS_PICTURE_TRANSFORM(surface) XCB_RENDER_AT_LEAST((surface), 0, 6)
#define XCB_RENDER_HAS_FILTERS(surface) XCB_RENDER_AT_LEAST((surface), 0, 6)
+#define XCB_RENDER_HAS_FILTER_GOOD(surface) FALSE
+#define XCB_RENDER_HAS_FILTER_BEST(surface) FALSE
#define XCB_RENDER_HAS_EXTENDED_REPEAT(surface) XCB_RENDER_AT_LEAST((surface), 0, 10)
#define XCB_RENDER_HAS_GRADIENTS(surface) XCB_RENDER_AT_LEAST((surface), 0, 10)
@@ -390,6 +392,12 @@ _cairo_xcb_connection_query_render (cairo_xcb_connection_t *connection)
if (XCB_RENDER_HAS_FILTERS (version))
connection->flags |= CAIRO_XCB_RENDER_HAS_FILTERS;
+ if (XCB_RENDER_HAS_FILTER_GOOD (version))
+ connection->flags |= CAIRO_XCB_RENDER_HAS_FILTER_GOOD;
+
+ if (XCB_RENDER_HAS_FILTER_BEST (version))
+ connection->flags |= CAIRO_XCB_RENDER_HAS_FILTER_BEST;
+
if (XCB_RENDER_HAS_PDF_OPERATORS (version))
connection->flags |= CAIRO_XCB_RENDER_HAS_PDF_OPERATORS;
@@ -882,6 +890,8 @@ cairo_xcb_device_debug_cap_xrender_version (cairo_device_t *device,
CAIRO_XCB_RENDER_HAS_COMPOSITE_TRAPEZOIDS |
CAIRO_XCB_RENDER_HAS_PICTURE_TRANSFORM |
CAIRO_XCB_RENDER_HAS_FILTERS |
+ CAIRO_XCB_RENDER_HAS_FILTER_GOOD |
+ CAIRO_XCB_RENDER_HAS_FILTER_BEST |
CAIRO_XCB_RENDER_HAS_PDF_OPERATORS |
CAIRO_XCB_RENDER_HAS_EXTENDED_REPEAT |
CAIRO_XCB_RENDER_HAS_GRADIENTS);
diff --git a/src/cairo-xcb-private.h b/src/cairo-xcb-private.h
index 2610458..1e1d1ee 100644
--- a/src/cairo-xcb-private.h
+++ b/src/cairo-xcb-private.h
@@ -259,6 +259,8 @@ enum {
CAIRO_XCB_RENDER_HAS_PDF_OPERATORS = 0x0080,
CAIRO_XCB_RENDER_HAS_EXTENDED_REPEAT = 0x0100,
CAIRO_XCB_RENDER_HAS_GRADIENTS = 0x0200,
+ CAIRO_XCB_RENDER_HAS_FILTER_GOOD = 0x0400,
+ CAIRO_XCB_RENDER_HAS_FILTER_BEST = 0x0800,
CAIRO_XCB_HAS_SHM = 0x80000000,
@@ -271,7 +273,9 @@ enum {
CAIRO_XCB_RENDER_HAS_FILTERS |
CAIRO_XCB_RENDER_HAS_PDF_OPERATORS |
CAIRO_XCB_RENDER_HAS_EXTENDED_REPEAT |
- CAIRO_XCB_RENDER_HAS_GRADIENTS,
+ CAIRO_XCB_RENDER_HAS_GRADIENTS |
+ CAIRO_XCB_RENDER_HAS_FILTER_GOOD |
+ CAIRO_XCB_RENDER_HAS_FILTER_BEST,
CAIRO_XCB_SHM_MASK = CAIRO_XCB_HAS_SHM
};
--
1.7.9.5
More information about the cairo
mailing list