OSDN Git Service
(root)
/
android-x86
/
frameworks-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12412ce
)
When the incoming light source is invalid, don't generate any shadow
author
Teng-Hui Zhu
<ztenghui@google.com>
Thu, 5 Nov 2015 00:57:53 +0000
(16:57 -0800)
committer
The Android Automerger
<android-build@google.com>
Fri, 6 Nov 2015 01:35:25 +0000
(17:35 -0800)
b/
25417885
Change-Id: I4b87e35ca68091fd0409cb9fe9b9400af860a507
libs/hwui/ShadowTessellator.cpp
patch
|
blob
|
history
diff --git
a/libs/hwui/ShadowTessellator.cpp
b/libs/hwui/ShadowTessellator.cpp
index
1bca3e7
..
6c8665b
100644
(file)
--- 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