Skip to content

Commit

Permalink
Add rayon parallel iterators (#2058)
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottyThePilot authored Dec 2, 2023
1 parent 483d3b9 commit 81b3fe6
Show file tree
Hide file tree
Showing 4 changed files with 503 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ color_quant = "1.1"
exr = { version = "1.5.0", optional = true }
qoi = { version = "0.4", optional = true }
libwebp = { package = "webp", version = "0.2.2", default-features = false, optional = true }
rayon = { version = "1.7.0", optional = true }

[dev-dependencies]
crc32fast = "1.2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ where
Container: Deref<Target = [P::Subpixel]> + DerefMut,
{
// TODO: choose name under which to expose.
fn inner_pixels_mut(&mut self) -> &mut [P::Subpixel] {
pub(crate) fn inner_pixels_mut(&mut self) -> &mut [P::Subpixel] {
let len = Self::image_buffer_len(self.width, self.height).unwrap();
&mut self.data[..len]
}
Expand Down
Loading

0 comments on commit 81b3fe6

Please sign in to comment.