Skip to content

Remove cumulative paint layer limit - #790

Open
VladimirKras wants to merge 2 commits into
DioxusLabs:mainfrom
VladimirKras:fix/remove-layer-limit
Open

VladimirKras wants to merge 2 commits into
DioxusLabs:mainfrom
VladimirKras:fix/remove-layer-limit

Conversation

@VladimirKras

@VladimirKras VladimirKras commented Aug 25, 2026 •

Copy link
Copy Markdown

Motivation

Dense scenes silently stop emitting requested clip and effect layers once cumulative painting crosses the nominal 1,024-layer limit, so later content is painted with the wrong layer stack and becomes visibly corrupted even when frame rate is healthy. The cap is enforced in backend-independent paint code, so it affects CPU and GPU renderers alike.

Why the cap can be removed

The cap was introduced at 28 in 596d419 as a workaround for Vello #644, then raised to 1,024 in c74b019. Vello fixed the underlying empty-clip encoding bug in Vello #651, merged in August 2024; Blitz now uses Vello 0.10.0, so retaining the old global workaround causes silent data loss without protecting current renderers from that historical bug.

Changes

  • Remove the cumulative layer cap and its now-unused accounting.

Validation

  • cargo test -p blitz-paint --lib
  • cargo clippy -p blitz-paint --no-deps -- -D warnings
  • cargo fmt --all -- --check
  • git diff --check

The workspace Clippy command currently stops on an unrelated existing needless_return warning at packages/blitz-dom/src/mutator.rs:1218 with Rust 1.96.1; the affected crate passes Clippy with dependency linting disabled.

Note

AI-assistance disclosure: this change and PR description were prepared with assistance from Codex/GPT-5 and reviewed by the submitter.

WPT results

No changes in test results compared to main.

Generated by the WPT workflow.

Dense scenes could silently stop emitting requested clip and effect layers after crossing the global limit, corrupting later content. Always preserve the layer stack and cover the previous cutoff with a recording-scene regression test.

Assisted-by: Codex/GPT-5

@nicoburns nicoburns left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This seems reasonable, but can we ditch the test please.

Vello Classic and Vello Hybrid both still have issues with resource allocation, but this isn't really guarding against it effectively.

@VladimirKras

Copy link
Copy Markdown
Author

Sorry about the useless test. Dropped it.

@VladimirKras
VladimirKras requested a review from nicoburns August 25, 2026 13:17
staging-devin-ai-integration Bot pushed a commit that referenced this pull request Sep 21, 2026
…arley

- stylo BreakSpaces now maps to parley::WhiteSpaceCollapse::BreakSpaces
  instead of Preserve. With the upstream Parley bump (#790) preserved
  trailing spaces no longer hang unconditionally, so the old mapping
  regressed the css-text/white-space/break-spaces-* tests.
- CSS ch/ic advances are scaled linearly from font units (as Parley's
  shaper does) instead of via GlyphMetrics' fixed-point scaling, so
  e.g. width: 4ch at 20px Ahem is 80px rather than 79.99px and no longer
  wraps content that exactly fits.
- Repin Parley to 346f8c5: quantized line-height: normal now rounds
  ascent/descent/leading before summing, matching browsers' whole-pixel
  normal line heights.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants