Skip to content
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
14 changes: 14 additions & 0 deletions crates/n0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,20 @@ the previously blended pixels. `tests/group_blending.rs` pins these consumer
laws with hand-built frames and exact pixel probes. Those tests do not claim
Chromium parity or measured performance.

An optional checked `BlendSourceDomain` on that operation is complete,
already-enclosed source material, not a geometry/damage box or an allocation
hint. The first glyphless consumer accepts identity-mapped declarations over
untransformed solid/linear rectangles and simple local strokes; it rejects
under-enclosing domains, nested effects within the declaration, nonidentity
declaration maps, enclosing filter/mask programs, and declarations inside
repeating programs. Ordinary undeclared scopes keep their existing profile.
The declaration targets the containing stream, independently of a scope item's
drawing map. Current-view mapping and device enclosure are recalculated for
every execution. Unsupported device bounds return an owner-bearing
`FrameExecutionError::SourceDomain` before touching the canvas. There is no
source-image cache. Consumer tests distinguish raster identity from painted
geometry and prove changed-view replay equals a fresh product.

Multiply and partial-opacity Screen restoration explicitly round byte opacity before scaling source
bytes and applying the byte-domain blend. This avoids pinned Skia's differing
ARM/x86 low-precision arithmetic and runtime-blender opacity ordering.
Expand Down
7 changes: 7 additions & 0 deletions crates/n0/src/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ pub enum FrameExecutionError {
Environment(PaintEnvironmentMismatch),
Image(crate::paint::ImagePreflightError),
Pattern(crate::paint::PatternPreflightError),
/// A declared source domain cannot be represented under the current view.
SourceDomain {
owner: rframe::VisualRef,
},
}

impl std::fmt::Display for FrameExecutionError {
Expand All @@ -148,6 +152,9 @@ impl std::fmt::Display for FrameExecutionError {
FrameExecutionError::Environment(error) => error.fmt(f),
FrameExecutionError::Image(error) => error.fmt(f),
FrameExecutionError::Pattern(error) => error.fmt(f),
FrameExecutionError::SourceDomain { owner } => {
write!(f, "blend source domain {owner:?} has an unsupported device enclosure under the current view")
}
}
}
}
Expand Down
Loading
Loading