OSDN Git Service

Make sure the theta is correctly represented and incoming polygon is CW for shadow.
authorztenghui <ztenghui@google.com>
Mon, 28 Apr 2014 23:43:13 +0000 (16:43 -0700)
committerztenghui <ztenghui@google.com>
Mon, 28 Apr 2014 23:43:13 +0000 (16:43 -0700)
commit2e023f3827dfc0dfc1ed7c3dd54d02b4a993f0b4
treeba319249cf92343e7d7488480a9646a235566ef9
parent7940dc57e3ffcf9c4a33375215f3a42250fa896c
Make sure the theta is correctly represented and incoming polygon is CW for shadow.

Now the theta = 0 should be on +x axis.
And cos(theta) should correctly represent x value.
Without this fix, the poly theta (from atan2) can be wrongly rotated 90 degrees.

Also, make sure the incoming polygon is CW for the shadow system.
This fix visual artifacts in recent regression for spot shadows.

bug:13553955

Change-Id: I9bbf54db094e7f133326da4dae4610962da849c1
libs/hwui/AmbientShadow.cpp
libs/hwui/OpenGLRenderer.cpp
libs/hwui/ShadowTessellator.cpp
libs/hwui/ShadowTessellator.h
libs/hwui/SpotShadow.cpp
libs/hwui/SpotShadow.h