summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBill Spitzak <spitzak@gmail.com>2014-10-09 19:46:13 -0700
committerBryce Harrington <bryce@osg.samsung.com>2014-10-10 18:09:01 -0700
commit58728da6eba4d89ba7c4328b22a552af633abb05 (patch)
treea7f5f93f80d29442bdb9c7dd6f8994a1383747df /src
parentc653dcd3e6ac1cef2440fa0db97a8e5ce30b2a47 (diff)
downloadcairo-58728da6eba4d89ba7c4328b22a552af633abb05.tar.gz
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>
Diffstat (limited to 'src')
-rw-r--r--src/cairo-xlib-source.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/cairo-xlib-source.c b/src/cairo-xlib-source.c
index 8275da3d8..81cc028e8 100644
--- a/src/cairo-xlib-source.c
+++ b/src/cairo-xlib-source.c
@@ -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,