summaryrefslogtreecommitdiff
path: root/src/cairo-xcb-surface.c
diff options
context:
space:
mode:
authorBilly Biggs <vektor@dumbterm.net>2005-08-08 18:35:22 +0000
committerBilly Biggs <vektor@dumbterm.net>2005-08-08 18:35:22 +0000
commit53444c286ef45fa0054ba6ab94dac11016e9600c (patch)
tree49dcd6446e92453fd133f4fcab2451d3afaf8e1f /src/cairo-xcb-surface.c
parent578b45c9032fd00b68fc1709d61e915d74a527c7 (diff)
Add a new API for disabling antialiasing of shapes drawn by cairo. This is a hint and is not supported by all backends.
Store the antialiasing mode in the gstate and pass it to the backend for trapezoid rendering and for clipping. Pass the antialiasing parameter down to the backend where appropriate. Pass the antialiasing parameter down to the backend where appropriate. Add support for A1 format trapezoid rendering, and remove the _create_mask_image function, creating a temporary image from memory we allocate and clear. Support A1 masks to disable antialiasing using the RENDER extension when requested. Support A1 masks to disable antialiasing using the RENDER extension when requested. Blindly pass through the antialising parameter. Add the antialiasing parameter but don't support it. Add a test case and a reference image from the latest libpixman. Add the new antialiasing disabling API to the docs. Update progress on a parameter to disable antialiasing. reviewed by: cworth, otaylor
Diffstat (limited to 'src/cairo-xcb-surface.c')
-rw-r--r--src/cairo-xcb-surface.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c
index 05e39b55e..2a7395f6e 100644
--- a/src/cairo-xcb-surface.c
+++ b/src/cairo-xcb-surface.c
@@ -942,6 +942,7 @@ static cairo_int_status_t
_cairo_xcb_surface_composite_trapezoids (cairo_operator_t operator,
cairo_pattern_t *pattern,
void *abstract_dst,
+ cairo_antialias_t antialias,
int src_x,
int src_y,
int dst_x,
@@ -980,9 +981,17 @@ _cairo_xcb_surface_composite_trapezoids (cairo_operator_t operator,
render_src_x = src_x + render_reference_x - dst_x;
render_src_y = src_y + render_reference_y - dst_y;
+ switch (antialias) {
+ case CAIRO_ANTIALIAS_NONE:
+ render_format = _format_from_cairo (dst->dpy, CAIRO_FORMAT_A1),
+ break;
+ default:
+ render_format = _format_from_cairo (dst->dpy, CAIRO_FORMAT_A8),
+ break;
+ }
+
/* XXX: The XTrapezoid cast is evil and needs to go away somehow. */
/* XXX: _format_from_cairo is slow. should cache something. */
- render_format = _format_from_cairo (dst->dpy, CAIRO_FORMAT_A8),
status = _cairo_xcb_surface_set_attributes (src, &attributes);
if (status == CAIRO_STATUS_SUCCESS)
XCBRenderTrapezoids (dst->dpy,