summaryrefslogtreecommitdiffstats
path: root/libs/hwui/ShadowTessellator.h
Commit message (Collapse)AuthorAgeFilesLines
* Glop ColorFilter & VertexBuffer support, initial enableChris Craik2015-02-061-2/+0
| | | | | | | Enables Glop rendering for supported Rects and VertexBuffers Also removes unused Query object Change-Id: Ibe227bc362685a153159f75077664f0947764e06
* Clean up physical couplingTom Hudson2014-10-151-2/+4
| | | | | | | | 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
* Re-triangulate the spot shadow.ztenghui2014-09-101-0/+4
| | | | | | | | | | | | | | | | 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
* Improve the spot shadow computation.ztenghui2014-08-221-1/+2
| | | | | | | | | | | | | | | | 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
* Tessellate on worker threadsChris Craik2014-06-101-2/+2
| | | | | | Tessellate and cache (where possible) shadow and round rect tessellation tasks. Change-Id: I2cfda8e11d83d51ea74af871235cf26e8f831d40
* Define light position (using new lighting spec) in JavaChris Craik2014-05-211-3/+2
| | | | | | Also updates the relative shadow strengths. Change-Id: I6cac7275d38df98aea9f0dda463cd7207102986a
* Merge "Add more shadow control knobs"Chris Craik2014-05-011-1/+1
|\
| * Add more shadow control knobsChris Craik2014-04-301-1/+1
| | | | | | | | Change-Id: I1ff500bf429029a97b681ced9df652f4ee9f1332
* | Make sure the theta is correctly represented and incoming polygon is CW for ↵ztenghui2014-04-281-0/+21
|/ | | | | | | | | | | | | | | 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
* Shoot the rays to the vertices of the incoming polygon.ztenghui2014-04-241-0/+2
| | | | | | bug:13553955 Change-Id: I4825a49e8eaab969c40f2ee4086f7669c9c6fd29
* Early rejection on shadows which are outside of the clip bound.ztenghui2014-03-201-2/+4
| | | | | | | | All the computations are estimated using bounding box. TODO: Spot shadow could have more accurate but also more expensive methods, we need more experiments to decide. Change-Id: I9c10c419576cee55daf0f9f278b0db78cb847447
* Create one hole inside the umbra area to avoid overdraw.ztenghui2014-03-171-10/+17
| | | | | | bug:13439450 Change-Id: I859575196bd5a3029f447883025a6ec3a1f1face
* Force shadow casters above the Z=0 planeChris Craik2014-03-121-0/+2
| | | | Change-Id: Ifee75414829d4bfb3c7aa6219f1f9bcfd50ff0c6
* Improve shadow tessellation performanceChris Craik2014-03-111-7/+3
| | | | | | | | - Tune and simplify shadow parameters - Remove additional inner rings - Improve polygon ray casting algorithm Change-Id: If0f28b2d66ae0480b675942bb65e8fcd2864425d
* Use pre-computed index to draw the shadow.ztenghui2014-02-251-1/+40
| | | | | | | | Also draw the umbra part as triangle fans instead of zig zag fashion. b/12840179 Change-Id: Iaa5d15e77351acdd71f076bd8f9bb2d4d2b92faf
* Use path outlines to define shadow shapesChris Craik2014-01-261-10/+4
| | | | | | | | | Fixes the simplifying assumption that shadow casters were always rectangular. Java side APIs + plumbing to pass down correct shapes still need to be added. Change-Id: Ic4fee90af15679951a44bb5cc6ae454b98c4c194
* Property support for light positioning.ztenghui2014-01-171-2/+3
| | | | | | Tune up the light size to make it look better. Change-Id: I139a05f3dd53dacbe55759b91188f0e1cc2c7f80
* Map shadow light position globallyChris Craik2014-01-161-1/+1
| | | | Change-Id: Ic3201cecdf5d2a1dd628e7e40aee912ef516d3b2
* Calculate and show the shadow from a spot light.ztenghui2014-01-101-0/+8
| | | | Change-Id: Ia558852e8cde5d33866b22875eb501e4c6858819
* Calculate and show Ambient shadow.ztenghui2013-12-131-0/+37
Basically we compute the shadow as a strip of triangles, whose alpha value is the strength of the shadow. We use the normal to extend the geometry. And we use static function and try to avoid new/malloc in the computation. Change-Id: I382286f1cad351bd5ff983f76f446c075819dcaf