summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorztenghui <ztenghui@google.com>2014-10-01 16:10:16 -0700
committerztenghui <ztenghui@google.com>2014-10-01 16:12:28 -0700
commit8def74de33b197c0c5ec8774576b1d71c7ec4f1b (patch)
tree3f9d1358848b4514bad542358df106dbfe09257b
parentfe426d061ad5feb65200c2970bf826b10e356247 (diff)
downloadframeworks_base-8def74de33b197c0c5ec8774576b1d71c7ec4f1b.zip
frameworks_base-8def74de33b197c0c5ec8774576b1d71c7ec4f1b.tar.gz
frameworks_base-8def74de33b197c0c5ec8774576b1d71c7ec4f1b.tar.bz2
+ correcting shadow visual appearance (b/17610926)
+ adjusting spot and ambient shadow opacity constants to achieve desired appearance + reducing ambient scale ratio back to 1.0 to address over-lightening at higher elevations + partially revert ag/546290 Change-Id: I9d7f664f73a7b9b83df73b739103c97054bd4f6e
-rw-r--r--core/res/res/values/dimens.xml4
-rw-r--r--libs/hwui/ShadowTessellator.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index 824ed9e..26d3133 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -412,7 +412,7 @@
<dimen name="light_y">-200dp</dimen>
<dimen name="light_z">800dp</dimen>
<dimen name="light_radius">800dp</dimen>
- <item type="dimen" format="float" name="ambient_shadow_alpha">0.047</item>
- <item type="dimen" format="float" name="spot_shadow_alpha">0.098</item>
+ <item type="dimen" format="float" name="ambient_shadow_alpha">0.075</item>
+ <item type="dimen" format="float" name="spot_shadow_alpha">0.15</item>
</resources>
diff --git a/libs/hwui/ShadowTessellator.cpp b/libs/hwui/ShadowTessellator.cpp
index 35cc7a4..c1ffa0a 100644
--- a/libs/hwui/ShadowTessellator.cpp
+++ b/libs/hwui/ShadowTessellator.cpp
@@ -37,7 +37,7 @@ void ShadowTessellator::tessellateAmbientShadow(bool isCasterOpaque,
// A bunch of parameters to tweak the shadow.
// TODO: Allow some of these changable by debug settings or APIs.
- float heightFactor = 1.0f / 86;
+ float heightFactor = 1.0f / 128;
const float geomFactor = 64;
Caches& caches = Caches::getInstance();