Commit 58728da6 authored by Bill Spitzak's avatar Bill Spitzak Committed by Bryce Harrington
Browse files

xlib: Use image fallback for GOOD/BEST filters



Fallback is not used if the symbols defined in the previous patch to
indicate if XRender does GOOD/BEST are true.

This patch also includes some changes to take advantage of the fact that
if there is an integer translation analyze_filter will already have set
the filter to NEAREST.
Reviewed-by: default avatarBryce Harrington <b.harrington@samsung.com>
parent c653dcd3
......@@ -1093,17 +1093,22 @@ pattern_is_supported (cairo_xlib_display_t *display,
return FALSE;
}
if (! CAIRO_RENDER_HAS_PICTURE_TRANSFORM (display)) {
if (!_cairo_matrix_is_integer_translation (&pattern->matrix, NULL, NULL))
return FALSE;
}
if (! CAIRO_RENDER_HAS_FILTERS (display)) {
/* No filters implies no transforms, so we optimise away BILINEAR */
switch (pattern->filter) {
case CAIRO_FILTER_FAST:
case CAIRO_FILTER_NEAREST:
return CAIRO_RENDER_HAS_PICTURE_TRANSFORM (display) ||
_cairo_matrix_is_integer_translation (&pattern->matrix, NULL, NULL);
case CAIRO_FILTER_GOOD:
return CAIRO_RENDER_HAS_FILTER_GOOD (display);
case CAIRO_FILTER_BEST:
return CAIRO_RENDER_HAS_FILTER_BEST (display);
case CAIRO_FILTER_BILINEAR:
case CAIRO_FILTER_GAUSSIAN:
default:
return CAIRO_RENDER_HAS_FILTERS (display);
}
return TRUE;
}
cairo_surface_t *
_cairo_xlib_source_create_for_pattern (cairo_surface_t *_dst,
const cairo_pattern_t *pattern,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment