summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorTenghui Zhu <ztenghui@google.com>2015-11-05 20:05:37 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-11-05 20:05:37 +0000
commit76d20b4a5c6463235d9497b8018a38c059a6761c (patch)
tree2688c2b07bce52854bb6c1001b974041f9a0a33c /libs
parentc8bb39d98d7c2a07f1a5c745f6e89e379e4a25f0 (diff)
parentcf22d184a37d4dd551b045857e5725601f89236c (diff)
downloadframeworks_base-76d20b4a5c6463235d9497b8018a38c059a6761c.zip
frameworks_base-76d20b4a5c6463235d9497b8018a38c059a6761c.tar.gz
frameworks_base-76d20b4a5c6463235d9497b8018a38c059a6761c.tar.bz2
Merge "When the incoming light source is invalid, don't generate any shadow" into mnc-dr-dev
Diffstat (limited to 'libs')
-rw-r--r--libs/hwui/ShadowTessellator.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/hwui/ShadowTessellator.cpp b/libs/hwui/ShadowTessellator.cpp
index 1bca3e7..6c8665b 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 %d",
adjustedLightCenter.x, adjustedLightCenter.y, adjustedLightCenter.z, lightRadius);
#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