Default to CAIRO_FILTER_GOOD rather than CAIRO_FILTER_BEST.

Optimize to use CAIRO_FILTER_NEAREST when the pattern matrix is an integer translation.
This commit is contained in:
Carl Worth 2005-04-12 09:14:14 +00:00
parent 439a94cc7b
commit 369d1bf28f
3 changed files with 14 additions and 2 deletions

View file

@ -1,3 +1,14 @@
2005-04-12 Carl Worth <cworth@cworth.org>
* src/cairo-pattern.c:
* src/cairo-surface.c: (_cairo_surface_init): Default to
CAIRO_FILTER_GOOD rather than CAIRO_FILTER_BEST.
* src/cairo-pattern.c:
(_cairo_pattern_acquire_surface_for_surface): Optimize to use
CAIRO_FILTER_NEAREST when the pattern matrix is an integer
translation.
2005-04-12 Carl Worth <cworth@cworth.org>
* src/cairo-pattern.c:

View file

@ -1076,7 +1076,7 @@ _cairo_pattern_acquire_surface_for_surface (cairo_surface_pattern_t *pattern,
attr->x_offset = -x;
attr->y_offset = -y;
attr->extend = CAIRO_EXTEND_NONE;
attr->filter = CAIRO_FILTER_BEST;
attr->filter = CAIRO_FILTER_GOOD;
cairo_matrix_init_identity (&attr->matrix);
}
@ -1107,6 +1107,7 @@ _cairo_pattern_acquire_surface_for_surface (cairo_surface_pattern_t *pattern,
cairo_matrix_init_identity (&attr->matrix);
attr->x_offset = tx;
attr->y_offset = ty;
attr->filter = CAIRO_FILTER_NEAREST;
}
else
{

View file

@ -50,7 +50,7 @@ _cairo_surface_init (cairo_surface_t *surface,
_cairo_user_data_array_init (&surface->user_data);
cairo_matrix_init_identity (&surface->matrix);
surface->filter = CAIRO_FILTER_BEST;
surface->filter = CAIRO_FILTER_GOOD;
surface->repeat = 0;
surface->device_x_offset = 0;