Fix recursive computation of filter bounds for drop shadow,
morphology, blur.

[Reland with fixed tests.]

Because we're computing "backwards" from a clip rect of destination
pixels to be filled to the required source pixels, we should use tail
recursion rather than head recursion in onFilterBounds().

This actually only makes a difference for drop-shadow, where
the computation is non-commutative. Blur and morphology commute, but I
moved them to tail recursion anyway for clarity (so all onFilterBounds
use tail recursion).

BUG=skia:
R=bsalomon@google.com

Author: senorblanco@chromium.org

Review URL: https://codereview.chromium.org/481273005
4 files changed