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 Jul 19, 2023
1 parent 238086f commit f400a41
Showing 1 changed file with 613 additions and 15 deletions.
Loading

0 comments on commit f400a41

Please sign in to comment.