From 14a4e35208b7e97bbfa38f36130827c86bfafc2b Mon Sep 17 00:00:00 2001 From: ztenghui Date: Wed, 13 Aug 2014 10:44:39 -0700 Subject: Bring back the shadow strength tweak bug:16712006 Change-Id: Ifc0ecca139d58140b45d7d227536a53069e1d480 --- libs/hwui/Caches.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libs/hwui/Caches.cpp') diff --git a/libs/hwui/Caches.cpp b/libs/hwui/Caches.cpp index 7bd0798cb53e..5689e170f5fd 100644 --- a/libs/hwui/Caches.cpp +++ b/libs/hwui/Caches.cpp @@ -703,6 +703,8 @@ void Caches::initTempProperties() { propertyLightPosY = -1.0f; propertyLightPosZ = -1.0f; propertyAmbientRatio = -1.0f; + propertyAmbientShadowStrength = -1; + propertySpotShadowStrength = -1; } void Caches::setTempProperty(const char* name, const char* value) { @@ -723,6 +725,14 @@ void Caches::setTempProperty(const char* name, const char* value) { propertyLightPosZ = fmin(fmax(atof(value), 0.0), 3000.0); ALOGD("lightPos Z = %.2f", propertyLightPosZ); return; + } else if (!strcmp(name, "ambientShadowStrength")) { + propertyAmbientShadowStrength = atoi(value); + ALOGD("ambient shadow strength = 0x%x out of 0xff", propertyAmbientShadowStrength); + return; + } else if (!strcmp(name, "spotShadowStrength")) { + propertySpotShadowStrength = atoi(value); + ALOGD("spot shadow strength = 0x%x out of 0xff", propertySpotShadowStrength); + return; } ALOGD(" failed"); } -- cgit v1.2.3-59-g8ed1b