11 Commits

Author SHA1 Message Date
ztenghui
25e5a02d1c Finer tessellation can draw better looking shadows for circles.
b/14976551

Change-Id: I4b9e320b025dbee37cd1893881ddbaad62e3a6e2
2014-09-11 10:10:25 -07:00
ztenghui
c50a03d78a 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
2014-08-22 13:51:16 -07:00
Chris Craik
69e5adffb1 Define shadow casting behavior within layers
bug:15860114

Savelayers and HW layers both now support shadow casting.

For save layers, the light source should always be correct, for HW
layers, the light source position is set when the layer is created,
and updated when it is resized.

Change-Id: Ie85567dd43c2bb0a0b08fd0bd4db41efa793ac2b
2014-08-15 00:59:44 +00:00
John Reck
1aa5d2d706 Fix ALL compile warnings
All warnings/errors fixed for GCC & Clang

Change-Id: I2ece3a136a5ae97a9acc3069537ed986238b5fd3
2014-07-24 14:28:08 -07:00
Chris Craik
c93e45cf04 Build layer damage bounds for shadows
bug:15538815

Change-Id: I703afeb7e31c28002bd1aff9ce448ec8cdc4e70d
2014-07-23 11:04:53 -07:00
Chris Craik
6ac174b972 Clean up tessellation cache in prep for other tesselation types
bug:15536396

Also fixes compilation warning, avoids SkPaint deep copy

Change-Id: I74334f08b1d34c6789aabf968ff62db5bacbed1b
2014-06-18 15:31:55 -07:00
Chris Craik
bd2d97f2b7 am 9de2a8f4: Merge "Add AA flag to TessellationCache key" into lmp-preview-dev
* commit '9de2a8f42d88e50146947a7bf21b212ea134ee83':
  Add AA flag to TessellationCache key
2014-06-12 22:51:27 +00:00
Chris Craik
ed4ef0bc17 Add AA flag to TessellationCache key
bug:15539571
Change-Id: I7cf470ca962041ab3c00c740e87c6ae9a95f06a8
2014-06-12 13:39:34 -07:00
Chris Craik
1b3be0877a Fix race in shadow tessellation by deep copying task params
bug:15369119
Change-Id: Ica1445f06693b1cfd038cf3494afe1210d5507c1
2014-06-11 13:49:34 -07:00
Chris Craik
6ef8e0178d Workaround to avoid polygon flashing DO NOT MERGE
b/15539571

Temporarily disables caching of tessellation.

Change-Id: If014b8c40664711aef761eec606d28aff1859b14
2014-06-11 19:10:26 -07:00
Chris Craik
05f3d6e511 Tessellate on worker threads
Tessellate and cache (where possible) shadow and round rect
tessellation tasks.

Change-Id: I2cfda8e11d83d51ea74af871235cf26e8f831d40
2014-06-10 01:53:17 +00:00