Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rayon parallel iterators #2058

Merged
merged 3 commits into from
Dec 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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] {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly a note to myself: this method should theoretically be the same as the DerefMut implementation below, but actually behaves slightly differently. I want to look into why, and maybe even eliminate the duplication

let len = Self::image_buffer_len(self.width, self.height).unwrap();
&mut self.data[..len]
}
Expand Down
Loading
Loading