M14.4: as_chunks for the pixel loops main gained since the no-panics branch
Same treatment as the branch's `as_chunks` commit (Rust 1.99's `chunks_exact_to_as_chunks` lint) for the flattener's coverage pass, the CMYK ink compositor, the Flattener Preview highlight and four test helpers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1a5f7f6441
commit
7fb07bb3db
7 files changed
+26
-7
No files matched your search
@@ -938,7 +938,7 @@ fn render_raster(doc: &Document, art: &[Node], rect: Rect, ppi: f64, clip: Optio
|
||||
})
|
||||
.collect();
|
||||
let cover = r.render_region(&isolated_doc(doc, cover), region, scale, false);
|
||||
for (px, c) in img.pixels.chunks_exact_mut(4).zip(cover.pixels.chunks_exact(4)) {
|
||||
for (px, c) in img.pixels.as_chunks_mut::<4>().0.iter_mut().zip(cover.pixels.as_chunks::<4>().0) {
|
||||
let k = c[3];
|
||||
let k2 = if o.anti_alias || k == 0 || k == 255 {
|
||||
k
|
||||
|
||||
Reference in new issue
Block a user