diff options
| author | 2015-11-06 00:00:33 +0000 | |
|---|---|---|
| committer | 2015-11-06 00:00:33 +0000 | |
| commit | cca2857ebb52d3ba06bbd42de7db2c33e04cf0cc (patch) | |
| tree | f4d266eaae5920bc47c80776291f3cdd7004390b | |
| parent | 69cc50f1e881b80db9767ce7535fe58067ca4222 (diff) | |
| parent | 3226c57321f15384ef7c1e93589c6d2a58cbe86c (diff) | |
Merge "When the incoming light source is invalid, don\'t generate any shadow"
am: 3226c57321
* commit '3226c57321f15384ef7c1e93589c6d2a58cbe86c':
When the incoming light source is invalid, don't generate any shadow
| -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 |