Files
pdfcraft/vendor/vello_cpu/Cargo.toml.orig
T
KenM76andClaude Opus 5.5 05630b5f15 fix(render): a gray drawn with the Color blend mode is no longer drawn black
vello_cpu 0.0.8's clip_color, shared by the nonseparable blend modes,
divided 0 by 0 when a gray's equal components were rounded just below 0
or above 1 after set_lum. The NaN drew the pixel black at the source's
alpha whatever the backdrop: nine gray levels under /BM /Color in an
empty isolated group (0.96 g among them) rendered (0, 0, 0), and two
more at half opacity came out wrong.

Vendor vello_cpu 0.0.8 (Apache-2.0 OR MIT) with a backport of
linebender/vello#2000, which clips only when the denominator is
positive. No vello_cpu release carries the fix yet; drop the copy when
one does.

Tests in it::nonseparable_gray run every gray level. The two Color
ramps fail with the unpatched blend.rs. The Luminosity ramp (black over
each opaque gray, upstream's other case) passes either way here: pages
use the u8 pipeline, and that case only failed in the f32 one; it stays
as a guard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SqmHYx8FiWM5PcsoiErgp9
2026-10-28 14:45:32 -04:00

74 lines
2.1 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[package]
name = "vello_cpu"
# When moving past 0.0.x, also update caveats in the README
version = "0.0.8"
description = "A CPU-based renderer for Vello, optimized for SIMD and multithreaded execution."
categories = ["rendering", "graphics"]
keywords = ["2d", "vector-graphics"]
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
[package.metadata.docs.rs]
all-features = true
# There are no platform specific docs.
default-target = "x86_64-unknown-linux-gnu"
targets = []
[dependencies]
bytemuck = { workspace = true }
glifo = { workspace = true, default-features = false, optional = true }
vello_common = { workspace = true }
hashbrown = { workspace = true }
png = { workspace = true, optional = true }
crossbeam-channel = { workspace = true, optional = true }
ordered-channel = { workspace = true, optional = true, features = ["crossbeam-channel"] }
rayon = { workspace = true, optional = true }
thread_local = { workspace = true, optional = true }
[features]
# If adding new features, also add to `src/lib.rs`
default = ["std", "png", "text", "u8_pipeline"]
# Get floating point functions from the standard library (likely using your target’s libc).
std = ["vello_common/std", "glifo?/std"]
# Use floating point implementations from libm.
libm = ["vello_common/libm", "glifo?/libm"]
# Allow loading Pixmap from PNG, and drawing png glyphs.
png = ["dep:png", "vello_common/png", "glifo?/png"]
# Enable multi-threaded rendering.
multithreading = [
"std",
"dep:rayon",
"dep:thread_local",
"dep:ordered-channel",
"dep:crossbeam-channel",
"vello_common/multithreading",
]
# Add support for text rendering
text = ["dep:glifo"]
# Speed focussed rendering using u8 math
u8_pipeline = []
# Quality focussed rendering using f32 math
f32_pipeline = []
[lints]
workspace = true
[[example]]
name = "basic"
required-features = ["png", "std"]
[[example]]
name = "clipping"
required-features = ["png", "std"]
[[example]]
name = "masking"
required-features = ["png", "std"]
[[example]]
name = "paints"
required-features = ["png", "std"]