Primitive masking support in Canvas 2D backend.