Simplify perspective shadows to match future MD specs.

* For ambient we outset a constant amount around the perspective shape.
* For spot we compute the projection of the bounds from the light's
  perspective, and from that compute a matrix to transform the path.

Bug: skia:7971
Change-Id: I7fffdd1446423956773d145ff4fae0a81602ad5b
Reviewed-on: https://skia-review.googlesource.com/150471
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/tests/ShadowTest.cpp b/tests/ShadowTest.cpp
index 07ff6df..f7522ba 100644
--- a/tests/ShadowTest.cpp
+++ b/tests/ShadowTest.cpp
@@ -154,6 +154,12 @@
     ctm[SkMatrix::kMPersp0] = 0.0001f;
     ctm[SkMatrix::kMPersp1] = 12.f;
     check_xformed_bounds(reporter, path, ctm);
+    ctm[SkMatrix::kMPersp0] = 0.0001f;
+    ctm[SkMatrix::kMPersp1] = -12.f;
+    check_xformed_bounds(reporter, path, ctm);
+    ctm[SkMatrix::kMPersp0] = 12.f;
+    ctm[SkMatrix::kMPersp1] = 0.0001f;
+    check_xformed_bounds(reporter, path, ctm);
 }
 
 DEF_TEST(ShadowBounds, reporter) {