Skip to content

Add a layer and filter interface in the 2D canvas - #9537

Open
graveljp wants to merge 15 commits into
whatwg:mainfrom
graveljp:layer-filter-spec
Open

graveljp wants to merge 15 commits into
whatwg:mainfrom
graveljp:layer-filter-spec

Conversation

@graveljp

@graveljp graveljp commented Jul 19, 2023 •

Copy link
Copy Markdown
Contributor

This adds new beginLayer and endLayer functions to open and close layers
in the canvas. While layers are active, draw calls operate on a separate
texture that gets composited to the parent output bitmap when the layer
is closed. An optional filter can be specified in beginLayer, allowing
effects to be applied to the layer's texture when it's composited its
parent.

Fixes #8476

(See WHATWG Working Mode: Changes for more details.)


/acknowledgements.html ( diff )
/canvas.html ( diff )
/index.html ( diff )

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

Labels

topic: canvas Canvas, OffscreenCanvas, the 2D and bitmaprenderer contexts, and ImageBitmap

Development

Successfully merging this pull request may close these issues.

Canvas2D layers with filter support

7 participants