diff options
author | Teng-Hui Zhu <ztenghui@google.com> | 2015-11-04 16:57:53 -0800 |
---|---|---|
committer | Teng-Hui Zhu <ztenghui@google.com> | 2015-11-04 17:04:18 -0800 |
commit | cf22d184a37d4dd551b045857e5725601f89236c (patch) | |
tree | 99c02f6e67fc5e805244fbdc45d880f99b76059f /libs/hwui | |
parent | 8e7ab07ce76c20da653e098adfe38da867753305 (diff) | |
download | frameworks_base-cf22d184a37d4dd551b045857e5725601f89236c.zip frameworks_base-cf22d184a37d4dd551b045857e5725601f89236c.tar.gz frameworks_base-cf22d184a37d4dd551b045857e5725601f89236c.tar.bz2 |
When the incoming light source is invalid, don't generate any shadow
b/25417885
Change-Id: I4b87e35ca68091fd0409cb9fe9b9400af860a507
Diffstat (limited to 'libs/hwui')
-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 09d1258..595c10c 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 |