[librsvg: 1/5] compare_surfaces: set the alpha of the diff always to opaque
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 1/5] compare_surfaces: set the alpha of the diff always to opaque
- Date: Thu, 20 Aug 2020 03:00:10 +0000 (UTC)
commit 660f01f5f611197f61ed4994457a5ee51b2f0907
Author: Federico Mena Quintero <federico gnome org>
Date: Wed Aug 19 18:17:27 2020 -0500
compare_surfaces: set the alpha of the diff always to opaque
This was missing in the port from the C code; no wonder the diffs were
always fully transparent.
librsvg_crate/tests/utils/compare_surfaces.rs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/librsvg_crate/tests/utils/compare_surfaces.rs b/librsvg_crate/tests/utils/compare_surfaces.rs
index 91a694741..0a6e48e2d 100644
--- a/librsvg_crate/tests/utils/compare_surfaces.rs
+++ b/librsvg_crate/tests/utils/compare_surfaces.rs
@@ -103,13 +103,15 @@ pub fn compare_surfaces(
pixel_diff.b = pixel_diff.a;
}
+ pixel_diff.a = 255;
+
diff_data.set_pixel(diff_stride, pixel_diff, xa, ya);
} else {
let black = Pixel {
r: 0,
g: 0,
b: 0,
- a: 0,
+ a: 255,
};
diff_data.set_pixel(diff_stride, black, xa, ya);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]