Loading libs/hwui/Caches.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -405,7 +405,7 @@ TextureVertex* Caches::getRegionMesh() { /////////////////////////////////////////////////////////////////////////////// void Caches::initTempProperties() { propertyLightDiameter = -1.0f; propertyLightRadius = -1.0f; propertyLightPosY = -1.0f; propertyLightPosZ = -1.0f; propertyAmbientRatio = -1.0f; Loading @@ -419,9 +419,9 @@ void Caches::setTempProperty(const char* name, const char* value) { propertyAmbientRatio = fmin(fmax(atof(value), 0.0), 10.0); ALOGD("ambientRatio = %.2f", propertyAmbientRatio); return; } else if (!strcmp(name, "lightDiameter")) { propertyLightDiameter = fmin(fmax(atof(value), 0.0), 3000.0); ALOGD("lightDiameter = %.2f", propertyLightDiameter); } else if (!strcmp(name, "lightRadius")) { propertyLightRadius = fmin(fmax(atof(value), 0.0), 3000.0); ALOGD("lightRadius = %.2f", propertyLightRadius); return; } else if (!strcmp(name, "lightPosY")) { propertyLightPosY = fmin(fmax(atof(value), 0.0), 3000.0); Loading libs/hwui/Caches.h +1 −1 Original line number Diff line number Diff line Loading @@ -214,7 +214,7 @@ public: void initTempProperties(); void setTempProperty(const char* name, const char* value); float propertyLightDiameter; float propertyLightRadius; float propertyLightPosY; float propertyLightPosZ; float propertyAmbientRatio; Loading libs/hwui/ShadowTessellator.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -87,8 +87,8 @@ void ShadowTessellator::tessellateSpotShadow(bool isCasterOpaque, reverseReceiverTransform.loadInverse(receiverTransform); reverseReceiverTransform.mapPoint3d(adjustedLightCenter); if (CC_UNLIKELY(caches.propertyLightDiameter > 0)) { lightRadius = caches.propertyLightDiameter; if (CC_UNLIKELY(caches.propertyLightRadius > 0)) { lightRadius = caches.propertyLightRadius; } // Now light and caster are both in local space, we will check whether Loading Loading
libs/hwui/Caches.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -405,7 +405,7 @@ TextureVertex* Caches::getRegionMesh() { /////////////////////////////////////////////////////////////////////////////// void Caches::initTempProperties() { propertyLightDiameter = -1.0f; propertyLightRadius = -1.0f; propertyLightPosY = -1.0f; propertyLightPosZ = -1.0f; propertyAmbientRatio = -1.0f; Loading @@ -419,9 +419,9 @@ void Caches::setTempProperty(const char* name, const char* value) { propertyAmbientRatio = fmin(fmax(atof(value), 0.0), 10.0); ALOGD("ambientRatio = %.2f", propertyAmbientRatio); return; } else if (!strcmp(name, "lightDiameter")) { propertyLightDiameter = fmin(fmax(atof(value), 0.0), 3000.0); ALOGD("lightDiameter = %.2f", propertyLightDiameter); } else if (!strcmp(name, "lightRadius")) { propertyLightRadius = fmin(fmax(atof(value), 0.0), 3000.0); ALOGD("lightRadius = %.2f", propertyLightRadius); return; } else if (!strcmp(name, "lightPosY")) { propertyLightPosY = fmin(fmax(atof(value), 0.0), 3000.0); Loading
libs/hwui/Caches.h +1 −1 Original line number Diff line number Diff line Loading @@ -214,7 +214,7 @@ public: void initTempProperties(); void setTempProperty(const char* name, const char* value); float propertyLightDiameter; float propertyLightRadius; float propertyLightPosY; float propertyLightPosZ; float propertyAmbientRatio; Loading
libs/hwui/ShadowTessellator.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -87,8 +87,8 @@ void ShadowTessellator::tessellateSpotShadow(bool isCasterOpaque, reverseReceiverTransform.loadInverse(receiverTransform); reverseReceiverTransform.mapPoint3d(adjustedLightCenter); if (CC_UNLIKELY(caches.propertyLightDiameter > 0)) { lightRadius = caches.propertyLightDiameter; if (CC_UNLIKELY(caches.propertyLightRadius > 0)) { lightRadius = caches.propertyLightRadius; } // Now light and caster are both in local space, we will check whether Loading