[librsvg/wip/otte: 29/39] tests: Don't resize to 480px width
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/wip/otte: 29/39] tests: Don't resize to 480px width
- Date: Tue, 20 Oct 2015 12:36:12 +0000 (UTC)
commit 475b236bdf35874ec855c09d6f0bc1cd67f913fc
Author: Benjamin Otte <otte redhat com>
Date: Sun Oct 18 20:42:58 2015 +0200
tests: Don't resize to 480px width
Instead, use the width as specified in the SVG.
tests/Makefile.am | 4 +---
tests/rsvg-test.c | 18 ++----------------
2 files changed, 3 insertions(+), 19 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 5ec08b2..005687f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -27,9 +27,7 @@ CLEANFILES = $(TESTS)
libtest_utils_la_SOURCES = \
test-utils.c \
- test-utils.h \
- $(top_srcdir)/rsvg-size-callback.c \
- $(top_srcdir)/rsvg-size-callback.h
+ test-utils.h
libtest_utils_la_LIBADD = \
$(LIBM)
diff --git a/tests/rsvg-test.c b/tests/rsvg-test.c
index d2f97ec..4339a09 100644
--- a/tests/rsvg-test.c
+++ b/tests/rsvg-test.c
@@ -162,20 +162,11 @@ compare_surfaces (cairo_surface_t *surface_a,
}
static void
-rsvg_cairo_size_callback (int *width, int *height, gpointer data)
-{
- RsvgDimensionData *dimensions = data;
- *width = dimensions->width;
- *height = dimensions->height;
-}
-
-static void
rsvg_cairo_check (gconstpointer data)
{
char const *test_name = data;
RsvgHandle *rsvg;
RsvgDimensionData dimensions;
- struct RsvgSizeCallbackData size_data;
cairo_t *cr;
cairo_surface_t *surface_a, *surface_b, *surface_diff;
buffer_diff_result_t result;
@@ -194,14 +185,9 @@ rsvg_cairo_check (gconstpointer data)
rsvg = rsvg_handle_new_from_file (svg_filename, NULL);
g_assert (rsvg != NULL);
- rsvg_handle_set_size_callback (rsvg, rsvg_cairo_size_callback, &dimensions, NULL);
rsvg_handle_get_dimensions (rsvg, &dimensions);
- size_data.type = RSVG_SIZE_WH_MAX;
- size_data.height = -1;
- size_data.width = TEST_WIDTH;
- size_data.keep_aspect_ratio = FALSE;
- _rsvg_size_callback (&dimensions.width, &dimensions.height, &size_data);
-
+ g_assert (dimensions.width > 0);
+ g_assert (dimensions.height > 0);
surface_a = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
dimensions.width, dimensions.height);
cr = cairo_create (surface_a);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]