Set margin for outer blur masks with no blur.

The margin of a mask filter is intended to be the additional src region
which the mask filter will take into account when creating the dst (a
region which will be assumed to be fully transparent around the src).
In the event there is an outer blur with no effective blur the src does
not need to be considered at all since the outcome will always be an
empty mask. The 'margin' is then effectively -inf in all directions, but
currently users of margin expect the value to come back non-negative.
This sets the margin in this case to 0 to allow the users to do their
work and then the filter will simply discard that work.

Currently the margin is not being set at all, leading to undefined
behavior. In the future the users of mask filters need to be able to
handle negative margins and there needs to be a way for the mask filter
to signal that it will disregard any src image.

BUG=oss-fuzz:8332

Change-Id: Ia9d1711b8c68142134bb6d393de17b9abaf7b23a
Reviewed-on: https://skia-review.googlesource.com/128683
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
1 file changed