History log of /frameworks/base/libs/hwui/SpotShadow.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
94745ccb3339f22307dec828bb5ff70f81d674dd 07-Nov-2014 ztenghui <ztenghui@google.com> am 86f289fb: am 0b70c09c: am 7ae6fc81: Merge "A better looking and faster spot shadow." into lmp-mr1-dev

* commit '86f289fb505a8fef9e5aae822631a738540c31df':
A better looking and faster spot shadow.
d2dcd6fded3a036f334a88bf9593398833f2919a 30-Oct-2014 ztenghui <ztenghui@google.com> A better looking and faster spot shadow.

1. This improve the looking, the star shape (spike) on long action bar is gone.
Shadow is more smooth now.

2. The performance is better, too. For averaging around rect, round rect and
circle, the spot shadow itself is 3 times faster. On N7 v1, it could be less than
0.1 ms.

b/14976551
b/16712006

Change-Id: I61ed546ee56e7c8dbe504dfcaef12d084904b4b8
/frameworks/base/libs/hwui/SpotShadow.h
2dc236b2bae13b9a0ed9b3f7320502aecd7983b3 15-Oct-2014 Tom Hudson <tomhudson@google.com> Clean up physical coupling

Narrow the use of #include directives in hwui, replacing with forward
declarations where straightforward. Speeds compiles; doesn't do any
restructuring of code.

Change-Id: Icac2baffb5896f55d8c6718e9bd9d4bfa02d3ca0
/frameworks/base/libs/hwui/SpotShadow.h
9122b1b168d2a74d51517ed7282f4d6a8adea367 03-Oct-2014 ztenghui <ztenghui@google.com> Use float instead of double to increase spot shadow perf

This is helping spot shadow for 15%-20% increase.
With the new algorithm, we are less sensitive to the floating point error.

b/16712006

Change-Id: Ie30a6ce01e73d56054a0cf65a84549454339a7fd
/frameworks/base/libs/hwui/SpotShadow.h
512e643ce83b1d48ad9630a3622276f795cf4fb2 10-Sep-2014 ztenghui <ztenghui@google.com> Re-triangulate the spot shadow.

Fix the valid umbra detection.

This looks better b/c every vertex will have one ray shooting at it, such that
we don't miss the corner.

This performs better too, due to the polygon intersection is removed and less ray
intersection. 2x performance for rect and circle for spot shadow in test app.

b/17288227
b/15598793
b/16712006

Change-Id: I4a5ee397b9e192e93c8e35e6260b499e3e38a6f4
/frameworks/base/libs/hwui/SpotShadow.h
c50a03d78aaedd0003377e98710e7038bda330e9 21-Aug-2014 ztenghui <ztenghui@google.com> Improve the spot shadow computation.

Get rid of compuation of the intersection for penumbra and convex hull for umbra.
Use simple circle / normal to compute the penumbra and simple intersection for umbra.

The new way could be 2x to 4x faster from rectangle to round shape.
And this part is roughly half of the shadow computation, or 2/3 of spot shadow
computation.

This improve the spot shadow spikeness too.

b/16712006
b/14976551

Change-Id: I02911784868731369efa73f76fc915bc08248600
/frameworks/base/libs/hwui/SpotShadow.h
05f3d6e5111fd08df5cd9aae2c3d28399dc0e7f5 03-Jun-2014 Chris Craik <ccraik@google.com> Tessellate on worker threads

Tessellate and cache (where possible) shadow and round rect
tessellation tasks.

Change-Id: I2cfda8e11d83d51ea74af871235cf26e8f831d40
/frameworks/base/libs/hwui/SpotShadow.h
2e023f3827dfc0dfc1ed7c3dd54d02b4a993f0b4 29-Apr-2014 ztenghui <ztenghui@google.com> 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
/frameworks/base/libs/hwui/SpotShadow.h
50ecf849cb7ccc3482517b74d2214b347927791e 12-Mar-2014 ztenghui <ztenghui@google.com> Create one hole inside the umbra area to avoid overdraw.

bug:13439450

Change-Id: I859575196bd5a3029f447883025a6ec3a1f1face
/frameworks/base/libs/hwui/SpotShadow.h
726118b35240957710d4d85fb5747e2ba8b934f7 08-Mar-2014 Chris Craik <ccraik@google.com> Improve shadow tessellation performance

- Tune and simplify shadow parameters
- Remove additional inner rings
- Improve polygon ray casting algorithm

Change-Id: If0f28b2d66ae0480b675942bb65e8fcd2864425d
/frameworks/base/libs/hwui/SpotShadow.h
63d41abb40b3ce40d8b9bccb1cf186e8158a3687 14-Feb-2014 ztenghui <ztenghui@google.com> Use pre-computed index to draw the shadow.

Also draw the umbra part as triangle fans instead of zig zag fashion.

b/12840179

Change-Id: Iaa5d15e77351acdd71f076bd8f9bb2d4d2b92faf
/frameworks/base/libs/hwui/SpotShadow.h
f5ca8b4cb178008472e67fa0ae6a3e3fa75d7952 28-Jan-2014 ztenghui <ztenghui@google.com> Merge close vertices in a better way.

And add more verification code for testing purpose.

Change-Id: I5bc4f69e6582c02fd03106af9a98abd05a6755b7
/frameworks/base/libs/hwui/SpotShadow.h
7b4516e7ea552ad08d6e7277d311ef11bd8f12e8 07-Jan-2014 ztenghui <ztenghui@google.com> Calculate and show the shadow from a spot light.

Change-Id: Ia558852e8cde5d33866b22875eb501e4c6858819
/frameworks/base/libs/hwui/SpotShadow.h