Skip to content

Render linear-gradient CSS masks - #498

Merged
wieslawsoltes merged 1 commit into
mainfrom
feature/css-linear-gradient-mask-497
Sep 18, 2026
Merged

wieslawsoltes merged 1 commit into
mainfrom
feature/css-linear-gradient-mask-497

Conversation

@wieslawsoltes

Copy link
Copy Markdown
Collaborator

Problem and result

WebScene reflects CSS mask properties but did not publish or project their visual effect, so unchanged Code OSS fade surfaces painted as fully opaque content.

This change adds a bounded single-layer alpha linear-gradient(...) mask path:

  • emits a versioned retained mask resource and an isolated subtree group;
  • projects destination-in masks through Skia/Avalonia/Uno and Flutter;
  • supports direction, color/alpha stops, repeat/no-repeat axes, position, percentage/pixel size, and top-level calc(percent ± px) size;
  • clears pixels outside partial/no-repeat mask coverage and clips composition to element bounds;
  • includes the resource in retained damage comparison;
  • fails closed for multiple layers, unsupported repeat/composite modes, and luminance masks;
  • adds native retained-command regression assertions.

Multiple mask layers, radial and URL/SVG masks, luminance mode, and non-add compositing remain follow-up work under #256.

Validation

git diff --check passes. Per the current implementation-throughput directive, builds, native/browser tests, pixels, backend parity, performance, memory, package, and CI gates were intentionally not run; that cumulative debt is recorded in #497, #256, #235, and the integration/release epics.

Closes #497

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.

Render single linear-gradient CSS masks

1 participant