[librsvg/wip/otte: 32/39] tests: Mark pixels in diff where only the alpha channel differs
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/wip/otte: 32/39] tests: Mark pixels in diff where only the alpha channel differs
- Date: Tue, 20 Oct 2015 12:36:27 +0000 (UTC)
commit 5a4d161fb0f1b54de7a8e03f9ac62a6256e0ab8c
Author: Benjamin Otte <otte redhat com>
Date: Sun Oct 18 23:59:27 2015 +0200
tests: Mark pixels in diff where only the alpha channel differs
tests/rsvg-test.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/tests/rsvg-test.c b/tests/rsvg-test.c
index 32062e8..6b6fe9b 100644
--- a/tests/rsvg-test.c
+++ b/tests/rsvg-test.c
@@ -103,6 +103,11 @@ buffer_diff_core (unsigned char *_buf_a,
}
result.pixels_changed++;
+ if ((diff_pixel & 0x00ffffff) == 0) {
+ /* alpha only difference, convert to luminance */
+ guint8 alpha = diff_pixel >> 24;
+ diff_pixel = alpha * 0x010101;
+ }
row[x] = diff_pixel;
} else {
row[x] = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]