diff options
author | Nathan Pratta Teodosio <nathan.teodosio@canonical.com> | 2025-01-17 08:55:01 +0100 |
---|---|---|
committer | Nathan Pratta Teodosio <nathan.teodosio@canonical.com> | 2025-01-17 08:55:01 +0100 |
commit | 21ad7eb3992a7f6957202f79bd16c683496679f6 (patch) | |
tree | 2bb9f860ea28d49db359554d20003f58ab1b29b3 | |
parent | e5da5fd7bf12b69efb923d265f5c264e0513c9f3 (diff) |
Remove revert-rust-image-png.patch.
-rw-r--r-- | patches/revert-rust-image-png.patch | 92 | ||||
-rw-r--r-- | patches/series | 1 |
2 files changed, 0 insertions, 93 deletions
diff --git a/patches/revert-rust-image-png.patch b/patches/revert-rust-image-png.patch deleted file mode 100644 index 17fde03..0000000 --- a/patches/revert-rust-image-png.patch +++ /dev/null @@ -1,92 +0,0 @@ ---- b/third_party/rust/chromium_crates_io/vendor/png-0.17.15/src/filter.rs -+++ a/third_party/rust/chromium_crates_io/vendor/png-0.17.15/src/filter.rs -@@ -7,13 +7,11 @@ - /// TODO(https://github.com/rust-lang/rust/issues/86656): Stop gating this module behind the - /// "unstable" feature of the `png` crate. This should be possible once the "portable_simd" - /// feature of Rust gets stabilized. -+#[cfg(feature = "unstable")] --/// --/// This is only known to help on x86, with no change measured on most benchmarks on ARM, --/// and even severely regressing some of them. --/// So despite the code being portable, we only enable this for x86. --/// We can add more platforms once this code is proven to be beneficial for them. --#[cfg(all(feature = "unstable", target_arch = "x86_64"))] - mod simd { -+ // unused imports may ocur in this module due to conditional compilation -+ #![allow(unused_imports)] -+ use std::simd::cmp::{SimdOrd, SimdPartialEq, SimdPartialOrd}; - use std::simd::num::{SimdInt, SimdUint}; - use std::simd::{u8x4, u8x8, LaneCount, Simd, SimdElement, SupportedLaneCount}; - -@@ -28,6 +26,7 @@ - /// Funnily, the autovectorizer does a better job here - /// than a handwritten algorithm using std::simd! - /// We used to have a handwritten one but this is just faster. -+ #[cfg(target_arch = "x86_64")] - fn paeth_predictor<const N: usize>( - a: Simd<i16, N>, - b: Simd<i16, N>, -@@ -79,6 +78,7 @@ - /// - /// `b` is the current pixel in the previous row. `x` is the current pixel in the current row. - /// See also https://www.w3.org/TR/png/#filter-byte-positions -+ #[cfg(target_arch = "x86_64")] - fn paeth_step<const N: usize>( - state: &mut PaethState<i16, N>, - b: Simd<u8, N>, -@@ -116,15 +116,18 @@ - state.a = *x; - } - -+ #[cfg(target_arch = "x86_64")] - fn load3(src: &[u8]) -> u8x4 { - u8x4::from_array([src[0], src[1], src[2], 0]) - } - -+ #[cfg(target_arch = "x86_64")] - fn store3(src: u8x4, dest: &mut [u8]) { - dest[0..3].copy_from_slice(&src.to_array()[0..3]) - } - - /// Undoes `FilterType::Paeth` for `BytesPerPixel::Three`. -+ #[cfg(target_arch = "x86_64")] - pub fn unfilter_paeth3(mut prev_row: &[u8], mut curr_row: &mut [u8]) { - debug_assert_eq!(prev_row.len(), curr_row.len()); - debug_assert_eq!(prev_row.len() % 3, 0); -@@ -179,15 +182,18 @@ - } - } - -+ #[cfg(target_arch = "x86_64")] - fn load6(src: &[u8]) -> u8x8 { - u8x8::from_array([src[0], src[1], src[2], src[3], src[4], src[5], 0, 0]) - } - -+ #[cfg(target_arch = "x86_64")] - fn store6(src: u8x8, dest: &mut [u8]) { - dest[0..6].copy_from_slice(&src.to_array()[0..6]) - } - - /// Undoes `FilterType::Paeth` for `BytesPerPixel::Six`. -+ #[cfg(target_arch = "x86_64")] - pub fn unfilter_paeth6(mut prev_row: &[u8], mut curr_row: &mut [u8]) { - debug_assert_eq!(prev_row.len(), curr_row.len()); - debug_assert_eq!(prev_row.len() % 6, 0); -@@ -769,7 +775,7 @@ - } - } - BytesPerPixel::Four => { -+ #[cfg(feature = "unstable")] -- #[cfg(all(feature = "unstable", target_arch = "x86_64"))] - { - simd::unfilter_paeth_u8::<4>(previous, current); - return; -@@ -837,7 +844,7 @@ - } - } - BytesPerPixel::Eight => { -+ #[cfg(feature = "unstable")] -- #[cfg(all(feature = "unstable", target_arch = "x86_64"))] - { - simd::unfilter_paeth_u8::<8>(previous, current); - return; diff --git a/patches/series b/patches/series index c605071..fc0e4e4 100644 --- a/patches/series +++ b/patches/series @@ -27,4 +27,3 @@ no-widevine.patch no-unknown-warning.patch rust-mess.patch default-visibility-arg.patch -revert-rust-image-png.patch |