mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-02 06:28:49 -06:00
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
193 lines
3.8 KiB
TOML
193 lines
3.8 KiB
TOML
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
|
|
#
|
|
# When uploading crates to the registry Cargo will automatically
|
|
# "normalize" Cargo.toml files for maximal compatibility
|
|
# with all versions of Cargo and also rewrite `path` dependencies
|
|
# to registry (e.g., crates.io) dependencies.
|
|
#
|
|
# If you are reading this file be aware that the original Cargo.toml
|
|
# will likely look very different (and much more reasonable).
|
|
# See Cargo.toml.orig for the original contents.
|
|
|
|
[package]
|
|
edition = "2024"
|
|
rust-version = "1.88"
|
|
name = "vello_cpu"
|
|
version = "0.0.8"
|
|
build = false
|
|
autolib = false
|
|
autobins = false
|
|
autoexamples = false
|
|
autotests = false
|
|
autobenches = false
|
|
description = "A CPU-based renderer for Vello, optimized for SIMD and multithreaded execution."
|
|
readme = "README.md"
|
|
keywords = [
|
|
"2d",
|
|
"vector-graphics",
|
|
]
|
|
categories = [
|
|
"rendering",
|
|
"graphics",
|
|
]
|
|
license = "Apache-2.0 OR MIT"
|
|
repository = "https://github.com/linebender/vello"
|
|
resolver = "2"
|
|
|
|
[package.metadata.docs.rs]
|
|
all-features = true
|
|
default-target = "x86_64-unknown-linux-gnu"
|
|
targets = []
|
|
|
|
[features]
|
|
default = [
|
|
"std",
|
|
"png",
|
|
"text",
|
|
"u8_pipeline",
|
|
]
|
|
f32_pipeline = []
|
|
libm = [
|
|
"vello_common/libm",
|
|
"glifo?/libm",
|
|
]
|
|
multithreading = [
|
|
"std",
|
|
"dep:rayon",
|
|
"dep:thread_local",
|
|
"dep:ordered-channel",
|
|
"dep:crossbeam-channel",
|
|
"vello_common/multithreading",
|
|
]
|
|
png = [
|
|
"dep:png",
|
|
"vello_common/png",
|
|
"glifo?/png",
|
|
]
|
|
std = [
|
|
"vello_common/std",
|
|
"glifo?/std",
|
|
]
|
|
text = ["dep:glifo"]
|
|
u8_pipeline = []
|
|
|
|
[lib]
|
|
name = "vello_cpu"
|
|
path = "src/lib.rs"
|
|
|
|
[[example]]
|
|
name = "basic"
|
|
path = "examples/basic.rs"
|
|
required-features = [
|
|
"png",
|
|
"std",
|
|
]
|
|
|
|
[[example]]
|
|
name = "clipping"
|
|
path = "examples/clipping.rs"
|
|
required-features = [
|
|
"png",
|
|
"std",
|
|
]
|
|
|
|
[[example]]
|
|
name = "masking"
|
|
path = "examples/masking.rs"
|
|
required-features = [
|
|
"png",
|
|
"std",
|
|
]
|
|
|
|
[[example]]
|
|
name = "paints"
|
|
path = "examples/paints.rs"
|
|
required-features = [
|
|
"png",
|
|
"std",
|
|
]
|
|
|
|
[dependencies.bytemuck]
|
|
version = "1.25.0"
|
|
features = ["derive"]
|
|
|
|
[dependencies.crossbeam-channel]
|
|
version = "0.5.15"
|
|
optional = true
|
|
|
|
[dependencies.glifo]
|
|
version = "0.1.0"
|
|
optional = true
|
|
default-features = false
|
|
|
|
[dependencies.hashbrown]
|
|
version = "0.17.1"
|
|
features = ["default-hasher"]
|
|
default-features = false
|
|
|
|
[dependencies.ordered-channel]
|
|
version = "1.2.0"
|
|
features = [
|
|
"crossbeam-channel",
|
|
"crossbeam-channel",
|
|
]
|
|
optional = true
|
|
|
|
[dependencies.png]
|
|
version = "0.18.1"
|
|
optional = true
|
|
|
|
[dependencies.rayon]
|
|
version = "1.12.0"
|
|
optional = true
|
|
|
|
[dependencies.thread_local]
|
|
version = "1.1.9"
|
|
optional = true
|
|
|
|
[dependencies.vello_common]
|
|
version = "0.0.8"
|
|
default-features = false
|
|
|
|
[lints.clippy]
|
|
allow_attributes_without_reason = "warn"
|
|
cargo_common_metadata = "warn"
|
|
cast_possible_truncation = "warn"
|
|
collection_is_never_read = "warn"
|
|
dbg_macro = "warn"
|
|
debug_assert_with_mut_call = "warn"
|
|
default_trait_access = "warn"
|
|
doc_markdown = "warn"
|
|
fn_to_numeric_cast_any = "warn"
|
|
infinite_loop = "warn"
|
|
large_stack_arrays = "warn"
|
|
mismatching_type_param_order = "warn"
|
|
missing_assert_message = "warn"
|
|
missing_fields_in_debug = "warn"
|
|
negative_feature_names = "warn"
|
|
redundant_feature_names = "warn"
|
|
same_functions_in_if_condition = "warn"
|
|
semicolon_if_nothing_returned = "warn"
|
|
should_panic_without_expect = "warn"
|
|
todo = "warn"
|
|
too_many_arguments = "allow"
|
|
unseparated_literal_suffix = "warn"
|
|
use_self = "warn"
|
|
wildcard_dependencies = "warn"
|
|
|
|
[lints.rust]
|
|
elided_lifetimes_in_paths = "warn"
|
|
keyword_idents_2024 = "forbid"
|
|
missing_debug_implementations = "warn"
|
|
missing_docs = "warn"
|
|
non_ascii_idents = "forbid"
|
|
non_local_definitions = "forbid"
|
|
trivial_numeric_casts = "warn"
|
|
unnameable_types = "warn"
|
|
unreachable_pub = "warn"
|
|
unsafe_op_in_unsafe_fn = "forbid"
|
|
unused_import_braces = "warn"
|
|
unused_lifetimes = "warn"
|
|
unused_macro_rules = "warn"
|
|
unused_qualifications = "warn"
|