summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Stan Iliev <stani@google.com> 2016-07-27 18:08:06 -0400
committer Stan Iliev <stani@google.com> 2016-07-27 18:08:06 -0400
commitfdb625a309755fb762c448dd8c2c4e3a7cc26021 (patch)
treee3a02eaa56c56d105c9c2befb6058117dbf33a33
parenteadd9ca5aca0eed35f070fed6038f41e6d17ff5f (diff)
Delete dead code function SpotShadow::makeClockwise
Delete SpotShadow::makeClockwise, which is unused and does not link when compiler optimizations are disabled (for debugging). SpotShadow::makeClockwise calls non-existent function ShadowTessellator::isClockwise, which only works because the optimizer deletes the function. Change-Id: Ib8a014bf168782772faa1da7d75a079c1fd28ed9
-rw-r--r--libs/hwui/ShadowTessellator.h2
-rw-r--r--libs/hwui/SpotShadow.cpp15
-rw-r--r--libs/hwui/SpotShadow.h1
3 files changed, 0 insertions, 18 deletions
diff --git a/libs/hwui/ShadowTessellator.h b/libs/hwui/ShadowTessellator.h
index 5f4c9c53a9d8..2eaf187a1af1 100644
--- a/libs/hwui/ShadowTessellator.h
+++ b/libs/hwui/ShadowTessellator.h
@@ -80,8 +80,6 @@ public:
static Vector2 centroid2d(const Vector2* poly, int polyLength);
- static bool isClockwise(const Vector2* polygon, int len);
-
static Vector2 calculateNormal(const Vector2& p1, const Vector2& p2);
static int getExtraVertexNumber(const Vector2& vector1, const Vector2& vector2,
diff --git a/libs/hwui/SpotShadow.cpp b/libs/hwui/SpotShadow.cpp
index 760d814f27a8..e2ee5bf02630 100644
--- a/libs/hwui/SpotShadow.cpp
+++ b/libs/hwui/SpotShadow.cpp
@@ -302,21 +302,6 @@ bool SpotShadow::testPointInsidePolygon(const Vector2 testPoint,
}
/**
- * Make the polygon turn clockwise.
- *
- * @param polygon the polygon as a Vector2 array.
- * @param len the number of points of the polygon
- */
-void SpotShadow::makeClockwise(Vector2* polygon, int len) {
- if (polygon == nullptr || len == 0) {
- return;
- }
- if (!ShadowTessellator::isClockwise(polygon, len)) {
- reverse(polygon, len);
- }
-}
-
-/**
* Reverse the polygon
*
* @param polygon the polygon as a Vector2 array
diff --git a/libs/hwui/SpotShadow.h b/libs/hwui/SpotShadow.h
index 62a7e5dc8a3e..6108bb6bd585 100644
--- a/libs/hwui/SpotShadow.h
+++ b/libs/hwui/SpotShadow.h
@@ -54,7 +54,6 @@ private:
static void quicksortX(Vector2* points, int low, int high);
static bool testPointInsidePolygon(const Vector2 testPoint, const Vector2* poly, int len);
- static void makeClockwise(Vector2* polygon, int len);
static void reverse(Vector2* polygon, int len);
static void generateTriangleStrip(bool isCasterOpaque, float shadowStrengthScale,