diff options
Diffstat (limited to 'meta/recipes-gnome/librsvg/librsvg/0004-impl-ToPixel-for-CairoARGB.patch')
-rw-r--r-- | meta/recipes-gnome/librsvg/librsvg/0004-impl-ToPixel-for-CairoARGB.patch | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/meta/recipes-gnome/librsvg/librsvg/0004-impl-ToPixel-for-CairoARGB.patch b/meta/recipes-gnome/librsvg/librsvg/0004-impl-ToPixel-for-CairoARGB.patch deleted file mode 100644 index caf81af5d0..0000000000 --- a/meta/recipes-gnome/librsvg/librsvg/0004-impl-ToPixel-for-CairoARGB.patch +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | From c66987d6fa9f9e442eb7dac947f469bcf8c35d48 Mon Sep 17 00:00:00 2001 | ||
2 | From: Federico Mena Quintero <federico@gnome.org> | ||
3 | Date: Tue, 21 Sep 2021 12:54:12 -0500 | ||
4 | Subject: [PATCH] impl ToPixel for CairoARGB | ||
5 | |||
6 | Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/592> | ||
7 | Upstream-Status: Backport | ||
8 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
9 | --- | ||
10 | src/surface_utils/mod.rs | 12 ++++++++++++ | ||
11 | src/surface_utils/shared_surface.rs | 2 +- | ||
12 | 2 files changed, 13 insertions(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/src/surface_utils/mod.rs b/src/surface_utils/mod.rs | ||
15 | index 3f915cd01..4f751ece4 100644 | ||
16 | --- a/src/surface_utils/mod.rs | ||
17 | +++ b/src/surface_utils/mod.rs | ||
18 | @@ -93,6 +93,18 @@ impl ToGdkPixbufRGBA for Pixel { | ||
19 | } | ||
20 | } | ||
21 | |||
22 | +impl ToPixel for CairoARGB { | ||
23 | + #[inline] | ||
24 | + fn to_pixel(&self) -> Pixel { | ||
25 | + Pixel { | ||
26 | + r: self.r, | ||
27 | + g: self.g, | ||
28 | + b: self.b, | ||
29 | + a: self.a, | ||
30 | + } | ||
31 | + } | ||
32 | +} | ||
33 | + | ||
34 | impl ToPixel for GdkPixbufRGBA { | ||
35 | #[inline] | ||
36 | fn to_pixel(&self) -> Pixel { | ||
37 | diff --git a/src/surface_utils/shared_surface.rs b/src/surface_utils/shared_surface.rs | ||
38 | index 34dfc992e..20cd0f40b 100644 | ||
39 | --- a/src/surface_utils/shared_surface.rs | ||
40 | +++ b/src/surface_utils/shared_surface.rs | ||
41 | @@ -343,7 +343,7 @@ impl ImageSurface<Shared> { | ||
42 | .map(|row| row.as_rgba_mut()) | ||
43 | .zip(self.rows()) | ||
44 | .flat_map(|(dest_row, src_row)| src_row.iter().zip(dest_row.iter_mut())) | ||
45 | - .for_each(|(src, dest)| *dest = Pixel::from(*src).unpremultiply().to_pixbuf_rgba()); | ||
46 | + .for_each(|(src, dest)| *dest = src.to_pixel().unpremultiply().to_pixbuf_rgba()); | ||
47 | |||
48 | Some(pixbuf) | ||
49 | } | ||