Re-triangulate the spot shadow.
Fix the valid umbra detection.
This looks better b/c every vertex will have one ray shooting at it, such that
we don't miss the corner.
This performs better too, due to the polygon intersection is removed and less ray
intersection. 2x performance for rect and circle for spot shadow in test app.
b/17288227
b/15598793
b/16712006
Change-Id: I4a5ee397b9e192e93c8e35e6260b499e3e38a6f4
diff --git a/libs/hwui/ShadowTessellator.h b/libs/hwui/ShadowTessellator.h
index 141dff6..8f19b5c 100644
--- a/libs/hwui/ShadowTessellator.h
+++ b/libs/hwui/ShadowTessellator.h
@@ -101,6 +101,10 @@
*/
static void reverseVertexArray(Vertex* polygon, int len);
+ static int getExtraVertexNumber(const Vector2& vector1, const Vector2& vector2,
+ float divisor);
+
+ static void checkOverflow(int used, int total, const char* bufferName);
}; // ShadowTessellator
}; // namespace uirenderer