diff options
author | ztenghui <ztenghui@google.com> | 2014-03-14 14:35:54 -0700 |
---|---|---|
committer | ztenghui <ztenghui@google.com> | 2014-03-17 15:35:25 -0700 |
commit | 99af9429cda84ad0af1d7fcecb580295b0046882 (patch) | |
tree | 72de4ed7764ad7bf29e1374fec81715c2349d406 /libs | |
parent | 50ecf849cb7ccc3482517b74d2214b347927791e (diff) | |
download | frameworks_base-99af9429cda84ad0af1d7fcecb580295b0046882.zip frameworks_base-99af9429cda84ad0af1d7fcecb580295b0046882.tar.gz frameworks_base-99af9429cda84ad0af1d7fcecb580295b0046882.tar.bz2 |
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
Diffstat (limited to 'libs')
-rw-r--r-- | libs/hwui/SpotShadow.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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 @@ static float rayIntersectPoints(const Vector2& rayOrigin, float dx, float dy, #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) + |