Jorim Jaggi
ddc52285ca
Revert "Simplify projection matrix management."
...
This reverts commit 0efaa71d5414287ed4beac0a88cf76f7e33a1e74.
2014-05-11 16:16:17 +02:00
Chris Craik
0c0ec26366
Simplify projection matrix management.
...
Store in and use from snapshot, and remove the kFlagOrthoDirty flag,
as it's redundant with kFlagIsFboLayer.
Change-Id: I2bd380192d50117f4ce1fd2058213669a886f406
2014-05-09 16:11:14 -07:00
Chris Craik
e1f788b3e2
Merge "Rename matrices for consistency"
2014-05-09 18:02:53 +00:00
Chris Craik
e10e827ed6
Rename matrices for consistency
...
The projection matrix no longer contains viewing transformation, and
has thus been renamed.
Change-Id: I4f85ccdac97f4cb4f987bb05c389816680f1c94f
2014-05-08 14:28:26 -07:00
Chris Craik
e4aa95e362
Add logging utility methods
...
Change-Id: I0f316830dcc0bbf438292a6d0fbe9f8154368500
2014-05-08 13:57:05 -07:00
Derek Sollenberger
5b554f0103
Merge "Avoid caching shadow properties in Java & HWUI."
2014-05-08 14:41:47 +00:00
John Reck
832b151465
Cleanup attachFunctor
...
Bug: 13961296
Change-Id: Id48d11bfcc234afd1fd7e4fdd409a50e7208c81d
2014-05-07 14:39:44 -07:00
Derek Sollenberger
c29a0a4664
Avoid caching shadow properties in Java & HWUI.
...
bug: 10650594
Change-Id: I6f57df002710bb0567ed7e53fc0bfe96cfd504b8
2014-05-07 09:36:04 -04:00
Chris Craik
64ab917e5e
Merge "Add more shadow control knobs"
2014-05-01 01:31:12 +00:00
Chris Craik
f5be3ca5cc
Add more shadow control knobs
...
Change-Id: I1ff500bf429029a97b681ced9df652f4ee9f1332
2014-04-30 18:20:30 -07:00
ztenghui
0d575b084f
Merge "Make sure the theta is correctly represented and incoming polygon is CW for shadow."
2014-04-29 16:21:51 +00:00
ztenghui
2e023f3827
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
2014-04-28 16:43:13 -07:00
Chris Craik
3f085429fd
Clip TouchFeedbackDrawable effect to receiver Outline
...
Projected RenderNodes are now wrapped with a ClipRect or masked
SaveLayer, so that they are clipped to the outline of the projection
receiver surface.
Change-Id: I1d4afc1bb5d638d650bc0b1dac51a498f216773e
2014-04-23 16:15:11 -07:00
John Reck
8de65a8e05
Switch DisplayListData to a staging model
...
Bug: 13912977
Change-Id: I5b2f664e797be22a58300964f57ceb4fab60528c
2014-04-09 15:48:00 -07:00
John Reck
087bc0c14b
Refcount RenderNode
...
Change-Id: I7a86db8acc2b78ef33d987a43a119f5933d7d752
2014-04-07 14:53:08 -07:00
John Reck
c75db8266b
Merge "Remove kStatusInvoke & kStatusDraw"
2014-03-29 01:41:50 +00:00
John Reck
750ca6dbdb
Remove kStatusInvoke & kStatusDraw
...
They are unused
Change-Id: I44ecf1164dc6bc1b09438e733976d5a97a25f00e
2014-03-28 16:43:15 -07:00
Chris Craik
b265e2ca50
Support shadows on the root RenderNode
...
bug:13211941
Cleans up some of the RenderNode method naming
Also removes unnecessary clip/save/restores, clipping shadows
predictably, as drawn by the parent, before drawing (and clipping,
etc.) the shadow casting child.
Change-Id: I795115e1fb869bbbdd7be43e279b97490fecc7e0
2014-03-28 14:43:22 -07:00
Chris Craik
024433f896
Disable shadow overdraw avoidance in the inverse clip case
...
The caster is effectivly transparent, so skip the optimization just as
is done for alpha < 1.0
Change-Id: I3d294222adf0137e20c1fb5808313d487e92e0a8
2014-03-27 16:01:04 -07:00
Chris Craik
8c271ca63b
Add private circular reveal API on View/RenderNode
...
Change-Id: I139c8e12b354083149a665f6768f3f6931a8dd15
2014-03-25 16:03:48 -07:00
John Reck
bfb07a0377
Move where updateProperties is called
...
Change-Id: I27da448996019094c44487ce28c5689d098d6535
2014-03-24 21:00:18 -07:00
John Reck
d0a0b2a314
Add stagingProperties
...
Change-Id: Ic7de551f8843fd70a77f738e33028e25c020bb3c
2014-03-24 15:31:34 -07:00
ztenghui
af6f7ed8dd
Early rejection on shadows which are outside of the clip bound.
...
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
2014-03-20 15:25:47 -07:00
ztenghui
50ecf849cb
Create one hole inside the umbra area to avoid overdraw.
...
bug:13439450
Change-Id: I859575196bd5a3029f447883025a6ec3a1f1face
2014-03-17 10:10:02 -07:00
John Reck
361fd3d2ff
Merge "Rename DisplayList->RenderNode"
2014-03-12 21:03:03 +00:00
John Reck
e18264b079
Rename DisplayList->RenderNode
...
Change-Id: Id42e23c9a1a6eb6eaeafef707ced7fa6887b03d0
2014-03-12 13:56:30 -07:00
Chris Craik
b98f2116f5
Force shadow casters above the Z=0 plane
...
Change-Id: Ifee75414829d4bfb3c7aa6219f1f9bcfd50ff0c6
2014-03-12 11:19:42 -07:00
Chris Craik
b79a3e301a
Fix orthographic shadows projection, simplify shadow reordering
...
Separate matrix passed to shadow system into two parts, one for
transforming the polygon XY points (using the actual draw matrix) and
a separate one which respects correct 4x4 3d rotations and
translations for determining Z values.
Change-Id: I7e30a84774a8709df6b2241e8f51fc5583648fe8
2014-03-12 09:44:41 -07:00
Chris Craik
e361ad7ab1
Remove experimental perspective projection
...
Change-Id: Iad688c8395ccd4673cc129973802b5f01dfb45ba
2014-03-11 15:41:40 -07:00
Chris Craik
6786252405
Fix use of Skia deprecated methods
...
Change-Id: Ib89c20fc94bcce29b7490d6f55c73492735befda
2014-02-28 12:26:34 -08:00
Chris Craik
da3f525759
Merge "Fix TextureView texture filtering."
2014-02-27 22:20:31 +00:00
Chris Craik
9757ac0b9d
Fix TextureView texture filtering.
...
bug:11748993
TextureView should always be drawn with linear filtering if drawing a
buffer sized differently from the layer.
This fixes a bug where TextureViews that were sized differently from
their contents wouldn't be drawn with texture filtering, causing
visible scaling artifacts.
Change-Id: I8a5d27452fe7269ec53896992f37cff51e3ce15a
2014-02-25 18:50:17 -08:00
ztenghui
8198c3a8f5
Merge "Use pre-computed index to draw the shadow."
2014-02-25 23:20:06 +00:00
ztenghui
63d41abb40
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
2014-02-25 14:18:25 -08:00
Chris Craik
919e95cc23
Modulate shadow alpha by caster alpha
...
Change-Id: Ibc4b3958feb3b5dba91d30af470d76555a6209c8
2014-02-21 17:15:12 -08:00
Derek Sollenberger
674554fc36
Reapply "Refactor setting an SkPaint onto a hwui Layer."
...
This reverts commit 90d0c75e94a32fb7d993fae69762820aabc2fcbb.
Change-Id: Ie807761231edf7c848b019931dccbf466208c0be
2014-02-20 16:20:33 -05:00
ztenghui
ef94c6f88f
Separate spot and ambient shadow strength setting
...
Change-Id: I4530e618b09a7f44b5382f8a40646c0ebf5f214c
2014-02-13 17:09:45 -08:00
Derek Sollenberger
76d3a1b8d0
Removing SkiaColorFilter and inspecting the native object directly.
...
bug: 10650594
Change-Id: I4fcf66d008765afa0e35d011f58bc792183cb74f
2014-02-07 17:06:14 -05:00
Derek Sollenberger
d44fbe55a9
Keep the SkPaint used when creating a layer.
...
This will allow us to inspect the paint for thing other than
color and xfermode, such as SkColorFilters and SkShaders.
bug: 10650594
Change-Id: I2c3ddd07a3966e1e77af34136307e2b59b2898c1
2014-02-07 13:33:29 -05:00
Chris Craik
a2fe7affd3
Add initial hidden outline APIs
...
Background drawable outline usage and drawable outline calculation
still to come.
Change-Id: I8c7539f1638f86e1f8eb11f4fe49f705f61d58ba
2014-01-30 16:04:16 -08:00
Chris Craik
5e1814e2eb
Merge "Remove logging of DisplayList staleness"
2014-01-28 23:18:05 +00:00
Chris Craik
3783e70b55
Remove logging of DisplayList staleness
...
Change-Id: Ie6b3af3065d4d10ec0bc9b419223d3458d297ea8
2014-01-27 14:29:37 -08:00
Chris Craik
15a07a21eb
Use path outlines to define shadow shapes
...
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
2014-01-26 13:43:53 -08:00
Chris Craik
bb615a6ffb
Clear root level reorder lists to prevent accessing stale DisplayLists
...
bug:12581401
Adds temporary logging which should log/crash earlier on incorrectly
reordering hierarchies.
Change-Id: Iee00940718c3cc868161e754aff93cd3b2747094
2014-01-24 15:01:40 -08:00
ztenghui
cc3c25622c
Property support for light positioning.
...
Tune up the light size to make it look better.
Change-Id: I139a05f3dd53dacbe55759b91188f0e1cc2c7f80
2014-01-17 13:42:09 -08:00
Chris Craik
3197cded4e
Map shadow light position globally
...
Change-Id: Ic3201cecdf5d2a1dd628e7e40aee912ef516d3b2
2014-01-16 14:03:39 -08:00
ztenghui
7b4516e7ea
Calculate and show the shadow from a spot light.
...
Change-Id: Ia558852e8cde5d33866b22875eb501e4c6858819
2014-01-10 17:18:53 -08:00
Chris Craik
d218a92c0a
Use const where possible for drawing parameters
...
They should never be modified by a Renderer, only read and copied.
Change-Id: I9d8d55dca19115ee9dfeb2bb3f092ba2fb327cd4
2014-01-03 13:55:08 -08:00
Chris Craik
564acf7c9b
Fix Clang warnings/errors
...
Fix several build warnings (struct != class, int != size_t) and errors
(variable leng non-POD arrays).
Change-Id: I70b4e784365514303d8954bfcb1f39d7c22c1321
2014-01-02 16:52:32 -08:00
Chris Craik
d6b65f6771
Use const access to snapshot from OpenGLRenderer
...
Additionally, move clipping methods to StatefulBaseRenderer
Change-Id: Iff232bf16fc1ad3b7d89493da6d8915db7bc5e4f
2014-01-02 12:57:41 -08:00