Skip to content

Render radial and multiple-layer CSS masks #505

Description

@wieslawsoltes

Merged — 19 September 2026

WebScene PR #512 merged as 3eb26451 and closed this issue. Follow-up PR #513 merged as 4c81b80b to expose the shared layer parser to native scene emission. AppScene PR #177 merged as 06658b64 and closed AppScene #176, adding packaged native consumption.

The merged stack provides up to sixteen ordered linear/radial/SVG add layers, UTF-8 byte-framed immutable resources, one bounded union surface, multi-layer shorthand expansion, reference presenter projection, and native Skia/Graphite consumption.

Only git diff --check ran locally. WebScene docs/precompiled-JavaScript passed. Native contracts now reach only pre-existing main footprint/aspect-ratio errors. All pixel, WPT execution, mutation, lifecycle, performance, memory, package, and zero-browser gates remain deferred under #256 and the release epics.

Problem

The retained mask path supports one linear gradient or one SVG URL. Radial gradients and comma-separated mask layers remain fail-closed, while unchanged Code OSS and extensions can compose fades, rings, and icon layers with them.

Focused implementation

  • Parse and retain bounded circle/ellipse radial-gradient() geometry and stops using the existing premultiplied color/functional-length rules.
  • Publish an immutable ordered list of gradient/URL mask layers with per-layer repeat, position, size, mode, and composite identity.
  • Build one isolated mask surface, paint layers in CSS order, and apply the final alpha once to the element group in Skia and Flutter.
  • Keep layer count, stop count, decoded resource count, and temporary surface area bounded; unsupported repeating/conic/image-set/cross-fade forms fail closed.
  • Include all layer resources in equality, damage, mutation, and lifecycle accounting.

Gates

Chromium/native pixels for radial geometry and mixed URL/gradient layers; mutation/reorder/detach contracts; 4,096-element and 16-layer adversarial caps; allocations, cache entries, temporary surfaces, CPU and peak RSS; 100 panel cycles return to baseline.

Parent: #256. Depends on merged #501/#502.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    vscode-oss/plannedPlanned for the AppScene/WebScene VS Code OSS integration

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions