Fix the missing spot shadow when DEBUG_SHADOW is turned on
In the current design, this error should be tolerated since the delta should
be small enough. So we should not return here.
Change-Id: I251db2882b331d37ae7f0896e9aa95d69a5650da
diff --git a/libs/hwui/SpotShadow.cpp b/libs/hwui/SpotShadow.cpp
index 1b49083..f81cd12 100644
--- a/libs/hwui/SpotShadow.cpp
+++ b/libs/hwui/SpotShadow.cpp
@@ -62,7 +62,9 @@
#if DEBUG_SHADOW
double interpVal = (dx * (p1.y - rayOrigin.y) + dy * rayOrigin.x - dy * p1.x) / divisor;
- if (interpVal < 0 || interpVal > 1) return -1.0f; // error, doesn't intersect between points
+ if (interpVal < 0 || interpVal > 1) {
+ ALOGW("rayIntersectPoints is hitting outside the segment %f", interpVal);
+ }
#endif
double distance = (p1.x * (rayOrigin.y - p2.y) + p2.x * (p1.y - rayOrigin.y) +