Beginning of distance transform based flip, if it works get rid of the ContourFlip - that's too slow.
The distance transform based flip is now working, but is somewhat slow.  Haven't wrapped it in is_dirty checks, but it looks a lot better when the mask is moving around.
Disable this log error, when the mask is black it trips it.