Fix use-after-free in SkComposeColorFilter::asFragmentProcessor

Includes a unit test to generate the exact failing scenario, and also
fixes the case where inputFP was nullptr to begin with (and we would
have tried to call nullptr->clone().

Change-Id: I5a03730d1217d9b1747e5ad2018100bc1c5f9e50
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550714
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2 files changed