Skip to content

Commit

Permalink
Add a layer and filter interface in the 2D canvas
Browse files Browse the repository at this point in the history
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.

Tests:
 https://github.com/web-platform-tests/wpt/tree/master/html/canvas/element/layers
 https://github.com/web-platform-tests/wpt/tree/master/html/canvas/offscreen/layers

Fixes whatwg#8476
  • Loading branch information
graveljp committed Nov 14, 2024
1 parent 326677b commit 7f411fd
Showing 1 changed file with 614 additions and 15 deletions.
Loading

0 comments on commit 7f411fd

Please sign in to comment.