A while ago I tried implementing a photo mask tool in MockoFun which is based on FabricJS
Check out an working example: https://jsfiddle.net/codingdude/sk84xLh2/
The solution I came up was combining the built in fabric.Image.filters.BlendImage
filter with a custom FabricJS brush. Here's a glimpse at my implementation of that.
(function(){