Improve shadow tessellation performance
- Tune and simplify shadow parameters
- Remove additional inner rings
- Improve polygon ray casting algorithm
Change-Id: If0f28b2d66ae0480b675942bb65e8fcd2864425d
diff --git a/libs/hwui/SpotShadow.h b/libs/hwui/SpotShadow.h
index 6727eac..7839dc3 100644
--- a/libs/hwui/SpotShadow.h
+++ b/libs/hwui/SpotShadow.h
@@ -38,9 +38,8 @@
static void computeLightPolygon(int points, const Vector3& lightCenter,
float size, Vector3* ret);
- static int getStripSize(int rays, int layers);
+ static int getStripSize(int rays);
static void smoothPolygon(int level, int rays, float* rayDist);
- static float calculateOpacity(float jf);
static float rayIntersectPoly(const Vector2* poly, int polyLength,
const Vector2& point, float dx, float dy);
@@ -50,7 +49,6 @@
static int intersection(Vector2* poly1, int poly1length, Vector2* poly2, int poly2length);
static void sort(Vector2* poly, int polyLength, const Vector2& center);
- static float angle(const Vector2& point, const Vector2& center);
static void swap(Vector2* points, int i, int j);
static void quicksortCirc(Vector2* points, int low, int high, const Vector2& center);
static void quicksortX(Vector2* points, int low, int high);
@@ -65,8 +63,6 @@
static void generateTriangleStrip(const Vector2* penumbra, int penumbraLength,
const Vector2* umbra, int umbraLength, VertexBuffer& retstrips);
- static const double EPSILON = 1e-7;
-
#if DEBUG_SHADOW
// Verification utility function.
static bool testConvex(const Vector2* polygon, int polygonLength,