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: Bryce Harrington <b.harrington@samsung.com>
This commit is contained in:
Bill Spitzak 2014-10-09 19:46:13 -07:00 committed by Bryce Harrington
parent c653dcd3e6
commit 58728da6eb

View file

@ -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;
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);
}
if (! CAIRO_RENDER_HAS_FILTERS (display)) {
/* No filters implies no transforms, so we optimise away BILINEAR */
}
return TRUE;
}
cairo_surface_t *
_cairo_xlib_source_create_for_pattern (cairo_surface_t *_dst,
const cairo_pattern_t *pattern,