Put mask data to the canvas in small slices.
Merge pull request #4355 from nnethercote/sliced-masks

Put mask data to the canvas in small slices.