[librsvg] tests: Remove pdiff support
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] tests: Remove pdiff support
- Date: Thu, 22 Oct 2015 11:14:25 +0000 (UTC)
commit 0fd2e583c3594a29a7b723e3056034dcaf101dea
Author: Benjamin Otte <otte redhat com>
Date: Sun Oct 18 20:45:21 2015 +0200
tests: Remove pdiff support
We can generate ref images that are pixel-perfect. There is no need to
use pdiff, it just slows the testsuite down.
tests/Makefile.am | 4 -
tests/pdiff/CMakeLists.txt | 55 ------
tests/pdiff/Makefile.am | 21 ---
tests/pdiff/README.txt | 45 -----
tests/pdiff/args.c | 119 -------------
tests/pdiff/args.h | 46 -----
tests/pdiff/gpl.txt | 340 -------------------------------------
tests/pdiff/lpyramid.c | 111 ------------
tests/pdiff/lpyramid.h | 32 ----
tests/pdiff/pdiff.c | 387 ------------------------------------------
tests/pdiff/pdiff.h | 40 -----
tests/pdiff/perceptualdiff.c | 115 -------------
tests/rsvg-test.c | 27 +---
13 files changed, 2 insertions(+), 1340 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 005687f..f7f44d9 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,5 +1,3 @@
-SUBDIRS=pdiff .
-
TESTS = \
rsvg-test \
crash \
@@ -10,12 +8,10 @@ noinst_LTLIBRARIES = \
LDADD = $(top_builddir)/librsvg- RSVG_API_MAJOR_VERSION@.la \
libtest-utils.la \
- pdiff/libpdiff.la \
$(LIBRSVG_LIBS)
INCLUDES = -I$(srcdir) \
-I$(top_srcdir) \
- -I$(srcdir)/pdiff \
-DTEST_DATA_DIR="\"$(srcdir)\"" \
-DTEST_SRC_DIR="\"$(PWD)\"" \
-DTOP_SRC_DIR="\"$(top_srcdir)\"" \
diff --git a/tests/rsvg-test.c b/tests/rsvg-test.c
index 50bd665..d6f73de 100644
--- a/tests/rsvg-test.c
+++ b/tests/rsvg-test.c
@@ -38,8 +38,6 @@
#include "rsvg.h"
#include "rsvg-compat.h"
-#include "pdiff.h"
-
#define TEST_LIST_FILENAME TEST_DATA_DIR"/rsvg-test.txt"
typedef struct _buffer_diff_result {
@@ -118,17 +116,8 @@ compare_surfaces (cairo_surface_t *surface_a,
cairo_surface_t *surface_diff,
buffer_diff_result_t *result)
{
- /* These default values were taken straight from the
- * perceptualdiff program. We'll probably want to tune these as
- * necessary. */
- double gamma = 2.2;
- double luminance = 100.0;
- double field_of_view = 45.0;
- int discernible_pixels_changed;
-
- /* First, we run cairo's old buffer_diff algorithm which looks for
- * pixel-perfect images, (we do this first since the test suite
- * runs about 3x slower if we run pdiff_compare first).
+ /* Here, we run cairo's old buffer_diff algorithm which looks for
+ * pixel-perfect images.
*/
buffer_diff_core (cairo_image_surface_get_data (surface_a),
cairo_image_surface_get_data (surface_b),
@@ -143,18 +132,6 @@ compare_surfaces (cairo_surface_t *surface_a,
g_test_message ("%d pixels differ (with maximum difference of %d) from reference image\n",
result->pixels_changed, result->max_diff);
-
- /* Then, if there are any different pixels, we give the pdiff code
- * a crack at the images. If it decides that there are no visually
- * discernible differences in any pixels, then we accept this
- * result as good enough. */
- discernible_pixels_changed = pdiff_compare (surface_a, surface_b,
- gamma, luminance, field_of_view);
- if (discernible_pixels_changed == 0) {
- result->pixels_changed = 0;
- g_test_message ("But perceptual diff finds no visually discernible difference.\n"
- "Accepting result.\n");
- }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]