Consolidate ambient and spot code setup.

Uses shared code to create a polygon version of the path, as well as
computing the centroid and determining convexity. This makes things
more consistent and sets up for creating concave ambient shadows.

Bug: skia:7971
Change-Id: I3f36a423431361177ad9f53218b3ff0fdaa179e1
Reviewed-on: https://skia-review.googlesource.com/131585
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
1 file changed