summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2006-04-24 14:50:52 -0700
committerCarl Worth <cworth@cworth.org>2006-04-24 14:50:52 -0700
commit893239248a9a6ef1a7b9f770aec334f20c5c0861 (patch)
tree2138215147919f3c78c7a69736c2ff82d5e04340
parent28e25e1cce0a4e4c612743effb8927c5cb6b3c5b (diff)
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.
-rw-r--r--test/filter-nearest-offset.c2
-rw-r--r--test/move-to-show-surface.c2
-rw-r--r--test/paint-with-alpha.c2
-rw-r--r--test/scale-source-surface-paint.c2
-rw-r--r--test/source-surface-scale-paint.c2
-rw-r--r--test/translate-show-surface.c2
6 files changed, 6 insertions, 6 deletions
diff --git a/test/filter-nearest-offset.c b/test/filter-nearest-offset.c
index d7373c792..f664fbfb4 100644
--- a/test/filter-nearest-offset.c
+++ b/test/filter-nearest-offset.c
@@ -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);
diff --git a/test/move-to-show-surface.c b/test/move-to-show-surface.c
index 74bf51b7b..74cf3a019 100644
--- a/test/move-to-show-surface.c
+++ b/test/move-to-show-surface.c
@@ -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);
diff --git a/test/paint-with-alpha.c b/test/paint-with-alpha.c
index c35f679c5..3292d5f90 100644
--- a/test/paint-with-alpha.c
+++ b/test/paint-with-alpha.c
@@ -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);
diff --git a/test/scale-source-surface-paint.c b/test/scale-source-surface-paint.c
index 9553b9f1c..c2b76d3b0 100644
--- a/test/scale-source-surface-paint.c
+++ b/test/scale-source-surface-paint.c
@@ -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);
diff --git a/test/source-surface-scale-paint.c b/test/source-surface-scale-paint.c
index e5676c944..472630cad 100644
--- a/test/source-surface-scale-paint.c
+++ b/test/source-surface-scale-paint.c
@@ -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);
diff --git a/test/translate-show-surface.c b/test/translate-show-surface.c
index d81ed1ad0..cc0cb0700 100644
--- a/test/translate-show-surface.c
+++ b/test/translate-show-surface.c
@@ -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);
{