Prefer RGB24 over ARGB32 for source surfaces in tests.

Some tests were using source surfaces created as ARGB32 even though all
alpha values are entirely opaque. This meant these tests were triggering
more fallbacks than strictly necessary for what the tests are ttrying to
do.
This commit is contained in:
Carl Worth 2006-04-24 14:50:52 -07:00
parent 28e25e1cce
commit 893239248a
6 changed files with 6 additions and 6 deletions

View file

@ -62,7 +62,7 @@ draw (cairo_t *cr, int width, int height)
cairo_stroke (cr);
surface = cairo_image_surface_create_for_data ((unsigned char *) data,
CAIRO_FORMAT_ARGB32,
CAIRO_FORMAT_RGB24,
STAMP_WIDTH,
STAMP_HEIGHT,
STAMP_WIDTH * 4);

View file

@ -63,7 +63,7 @@ draw (cairo_t *cr, int width, int height)
for (i=0; i < 4; i++) {
surface = cairo_image_surface_create_for_data ((unsigned char *) &colors[i],
CAIRO_FORMAT_ARGB32,
CAIRO_FORMAT_RGB24,
1, 1, 4);
cairo_set_source_surface (cr, surface,
i % 2, i / 2);

View file

@ -44,7 +44,7 @@ draw (cairo_t *cr, int width, int height)
};
surface = cairo_image_surface_create_for_data ((unsigned char *) data,
CAIRO_FORMAT_ARGB32, 4, 4, 16);
CAIRO_FORMAT_RGB24, 4, 4, 16);
cairo_scale (cr, 2, 2);

View file

@ -44,7 +44,7 @@ draw (cairo_t *cr, int width, int height)
};
surface = cairo_image_surface_create_for_data ((unsigned char *) data,
CAIRO_FORMAT_ARGB32, 4, 4, 16);
CAIRO_FORMAT_RGB24, 4, 4, 16);
cairo_scale (cr, 2, 2);

View file

@ -44,7 +44,7 @@ draw (cairo_t *cr, int width, int height)
};
surface = cairo_image_surface_create_for_data ((unsigned char *) data,
CAIRO_FORMAT_ARGB32, 4, 4, 16);
CAIRO_FORMAT_RGB24, 4, 4, 16);
cairo_set_source_surface (cr, surface, 2, 2);
cairo_pattern_set_filter (cairo_get_source (cr), CAIRO_FILTER_NEAREST);

View file

@ -61,7 +61,7 @@ draw (cairo_t *cr, int width, int height)
for (i=0; i < 4; i++) {
surface = cairo_image_surface_create_for_data ((unsigned char *) &colors[i],
CAIRO_FORMAT_ARGB32,
CAIRO_FORMAT_RGB24,
1, 1, 4);
cairo_save (cr);
{