diff options
| author | 2015-11-04 16:57:53 -0800 | |
|---|---|---|
| committer | 2015-11-05 15:48:35 -0800 | |
| commit | 83ea5b7b22e26302eb943ffe7d143a2d242b6eb1 (patch) | |
| tree | ebd48014ef80b05d52b71d40940ad85b816447c1 | |
| parent | 22b7e496c23c76b1f6d94e3ce99f39f9d3bca973 (diff) | |
When the incoming light source is invalid, don't generate any shadow
b/25417885
Change-Id: I4b87e35ca68091fd0409cb9fe9b9400af860a507
| -rw-r--r-- | libs/hwui/ShadowTessellator.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/hwui/ShadowTessellator.cpp b/libs/hwui/ShadowTessellator.cpp index 09d125839a68..595c10c88554 100644 --- a/libs/hwui/ShadowTessellator.cpp +++ b/libs/hwui/ShadowTessellator.cpp @@ -80,6 +80,11 @@ void ShadowTessellator::tessellateSpotShadow(bool isCasterOpaque, ALOGD("light center %f %f %f", adjustedLightCenter.x, adjustedLightCenter.y, adjustedLightCenter.z); #endif + if (isnan(adjustedLightCenter.x) + || isnan(adjustedLightCenter.y) + || isnan(adjustedLightCenter.z)) { + return; + } // light position (because it's in local space) needs to compensate for receiver transform // TODO: should apply to light orientation, not just position |