Making layer mask managed by the Renderer
Masking thumbnail layers
Refactoring