The expected output would be this:
This was produced by the browser equivalent of the script above: https://jsfiddle.net/Lo8361tv/1/
Similar problems happen with the other three values with skia-canvas:
All of these black areas should be red in this case.
The
source-in
,source-out
,destination-atop
, andcopy
composite operations seem to always draw the source layer as if it was completely black.This script draws a green square on a canvas and then sets the composite operation to
destination-atop
before drawing a red square at an offset:This is what it outputs:
The expected output would be this: This was produced by the browser equivalent of the script above: https://jsfiddle.net/Lo8361tv/1/ Similar problems happen with the other three values with skia-canvas: All of these black areas should be red in this case.