[librsvg: 2/3] Rename row_of_bytes to row_of_u32 since that's what it contains now
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 2/3] Rename row_of_bytes to row_of_u32 since that's what it contains now
- Date: Thu, 10 Mar 2022 00:44:35 +0000 (UTC)
commit ff17d991c7814ed261644ab94ff092619535ae07
Author: Federico Mena Quintero <federico gnome org>
Date: Wed Mar 9 17:56:53 2022 -0600
Rename row_of_bytes to row_of_u32 since that's what it contains now
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/671>
src/surface_utils/shared_surface.rs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/surface_utils/shared_surface.rs b/src/surface_utils/shared_surface.rs
index c0ec73dec..dc4bc45e4 100644
--- a/src/surface_utils/shared_surface.rs
+++ b/src/surface_utils/shared_surface.rs
@@ -1219,9 +1219,9 @@ impl<'a> Iterator for Rows<'a> {
.data_ptr
.as_ptr()
.offset(row as isize * self.surface.stride);
- let row_of_bytes: &[u32] =
+ let row_of_u32: &[u32] =
slice::from_raw_parts(row_ptr as *const u32, self.surface.width as usize);
- let pixels = row_of_bytes.as_cairo_argb();
+ let pixels = row_of_u32.as_cairo_argb();
assert!(pixels.len() == self.surface.width as usize);
Some(pixels)
}
@@ -1255,9 +1255,9 @@ impl<'a> Iterator for RowsMut<'a> {
let data_ptr = self.data.as_mut_ptr();
let row_ptr: *mut u8 = data_ptr.offset(row as isize * self.stride as isize);
- let row_of_bytes: &mut [u32] =
+ let row_of_u32: &mut [u32] =
slice::from_raw_parts_mut(row_ptr as *mut u32, self.width as usize);
- let pixels = row_of_bytes.as_cairo_argb_mut();
+ let pixels = row_of_u32.as_cairo_argb_mut();
assert!(pixels.len() == self.width as usize);
Some(pixels)
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]