58 Commits

Author SHA1 Message Date
John Reck
dc0349beba Add missing null check
Bug: 16352267

Change-Id: Ib60baa6d22ec02ba623a297660e2e3ecc7557d0f
2014-08-06 22:28:47 +00:00
John Reck
c79eabcd3c roundOut layer damage
Bug: 16734708

Change-Id: I8815b7cf5f74be6deda98aaaf7cde85509def373
2014-08-05 20:54:28 +00:00
Chris Craik
77b5cad3ef Add outline alpha
bug:16140822
bug:16566746

This allows background drawables to alter the opacity of a shadow
being cast with their own alpha values.

Change-Id: I49698cc7c1bf4b2b55ffe2f82899543ca62bc61c
2014-07-31 12:29:57 -07:00
Chris Craik
af4d04cab6 Use RoundRect clipping for circle reveal animation
bug:16630975

Also, remove inverse clipping feature from reveal animator.

Change-Id: I770a4eb48cd123b0ca0f39d16a0f3eefd1be3653
2014-07-30 17:15:50 +00:00
Bo Liu
590b8d3601 Merge "Add kModeSync" into lmp-dev 2014-07-24 20:48:02 +00:00
John Reck
09d5cddf67 Add kModeSync
Bug: 16526750

Change-Id: I4c087160e80432739321172fd57880846c8de6e0
2014-07-24 10:36:08 -07:00
Chris Craik
a753f4c6cb Move ClipBounds to native
bug:15698973

Also simplifies RenderNode LTRB properties

Change-Id: I09263a697b71d325a46b57cd5250a2b165f251c8
2014-07-25 20:56:50 +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
0645128b80 Make setter methods on Outline call setEmpty() based on params
bug:16142564

Additionally, better define behavior around null outline providers:

A view with an empty outline, and setClipToOutline=true will not be
rendered, though one with a null outline provider
(and thus no outline) will be.

Change-Id: Ic9549841b107b2eb51b417c66058a0cd69dd89eb
2014-07-22 15:15:11 -07:00
John Reck
dcba6725e8 Fix layers lifecycle issues
Bug: 16118540

 Fix an issue where we could have a reference to a Layer after
 the GL context was destroyed

Change-Id: I7bfd909d735ca6b942ebe188fc10099422eb6d95
2014-07-08 14:14:55 -07:00
John Reck
8360153891 Revert "Fix destroyHardwareResources"
This reverts commit bac48c4d0c6f71f67074a430cd365ea2e15924b8.

Change-Id: Iba8b729d5e91ca31976fc2bdf9c1dd5fdb19de9a
2014-07-08 15:44:41 +00:00
John Reck
ec0c925480 Fix destroyHardwareResources
The UI thread needs to know whether or not the display list is
 valid, so bring back View.destroyHardwareResources and instead
 have the native side assert that View did the right thing

Change-Id: I4f8dee6e9c13ec7ab520becdc5cfe20e92a76f8f
2014-07-07 23:37:40 +00:00
John Reck
f47a594f52 Fix onTrimMemory for HardwareRenderer
Also fixes detachFunctor possibly drawing after return

 Bug: 15189843
 Bug: 15990672

Change-Id: I64c48cb674c461a8eeaba407b697e09f72c98ce3
2014-06-30 16:36:26 -07:00
John Reck
68bfe0a37a Animator refactoring & fixes
Tweaks animators to have less unnecessary refcounting

 Pull animator management out into seperate class

 More control to tweak animator lifecycle, such as doing
 Java-side handling of start delay by attaching but not
 starting the animator

Change-Id: I4ff8207580ca11fb38f45ef0007b406e0097281c
2014-06-26 10:45:43 -07:00
John Reck
3b20251a35 No-fail invokeFunctor
Bug: 15513308
 Bug: 15449247

Change-Id: I13a29f9c8d4975cdda6dcb33b6332c2555ff0f7c
2014-06-23 15:26:49 -07:00
Chris Craik
a7090e0cfd Update 'DisplayList' vs 'RenderNode' naming in several places
Change-Id: I635c6627d098b661fb9b0ba1bd42fa6d7277d287
2014-06-23 09:57:07 -07:00
Chris Craik
3281442aa7 Merge "Wrap ViewGroup content in save/restore to protect composited children" 2014-06-20 02:09:17 +00:00
Chris Craik
80d4902196 Wrap ViewGroup content in save/restore to protect composited children
bug:15570351

Pos Z composited children are drawn before the primary restore for a
RenderNode. This means that without an additional save/restore (which
wraps the content) they aren't protected from transformations/clips
that happen within the ViewGroup's DisplayList.

Also changes RenderNode to use OpenGLRenderer tag for displaylist
dumping consistency, and simplifies the entry points into RenderNode
drawing, since the distinction between tree root vs tree internal is
no longer important.

Change-Id: I2621eba0592c74d71f85a91a4ab3d0da2d7468d3
2014-06-20 16:18:58 -07:00
John Reck
c25e506f7f Throw ISE on too-big-views-with-layers
Bug: 12971954

Change-Id: I3ef995e91f236014b0a72a90846ef19ce6dc42b1
2014-06-18 14:31:52 -07:00
John Reck
ce9f308063 Fix dirty calculation for layer updates
Bug: 15682142

 Defer early return of alpha <= 0 for damage accumulation until
 popTransform() so that layer updates will be performed regardless
 of alpha

Change-Id: Ifb94dd3ed2d96d610e6f2f3071933903016273a5
2014-06-18 07:19:50 -07:00
John Reck
293e868bfc Handle Z in DA
Bug: 15671775

Change-Id: I33c7a70e78ef523ffd03165fb6c39d8e04d04f1f
2014-06-17 10:56:00 -07:00
John Reck
25fbb3fa11 Move LayerType to RenderNode
Change-Id: Icb79a5015cb0362b1f3a66d09007450730135a97
2014-06-12 19:25:33 -07:00
John Reck
a447d29c65 Fix DA bugs
* Now aware of transform of DrawDisplayListOp
 * Supports projection

 Bug: 15539677
 Bug: 15506680

Change-Id: Ic16f482cd48c3add12e49eca529281be12b93491
2014-06-12 09:13:45 -07:00
John Reck
e4267ea4f2 Even FASTER damage calculations!
* Now with more native!
 * Less matrix math thanks to bulk-property-update support!
 * Zero JNI on the View.damageInParent() path!
 * Fully aware of RT-driven animators!
 * Likely full of new and exciting bugs!
 * But it also fixes at least 1 existing invalidate bug!

Change-Id: Ie0773f85a60850ff2668370c58defef2e8aa079f
2014-06-04 12:21:26 -07:00
Derek Sollenberger
b2367cbf39 Merge "Update HWUI matrix API" 2014-05-30 15:34:34 +00:00
John Reck
fe5e7b7346 Enable debug stuffs
Bug: 14596762
 * dumpsys gfxinfo implemented
 * profile GPU visual_bars implemented

Change-Id: Icb948a9d5af5989b5615504d0d76ade64b93ef5b
2014-05-29 15:00:29 -07:00
Derek Sollenberger
139088228f Update HWUI matrix API
1. more closely mirror Skia API by using const ref instead of ptrs
2. store SkMatrix in the drawOp instead of the linear allocation heap

Change-Id: I4b9f6f76b9f7d19325e29303d27b793679fd4823
2014-05-29 16:51:23 -04:00
Chris Craik
61317325b7 Disable shadow drawing for empty/null outlines
Change-Id: I60d0f326cfab97d88c49d17cf32e619b5e60b94a
2014-05-21 13:04:10 -07:00
Chris Craik
c9ee304c91 Merge "Round rect outline clipping" 2014-05-16 00:37:29 +00:00
Chris Craik
deeda3d337 Round rect outline clipping
Change-Id: Iee9cf4f719f6f1917507b69189ad114fa365917b
2014-05-15 16:36:12 -07:00
John Reck
ff941dcd81 Animator start value...
Change-Id: Ifd35ed95a28c625086d7fa97764fe63ab4a997f1
2014-05-15 08:53:39 -07:00
Chris Craik
2bcad17675 Remove Path based outline clipping
Change-Id: Ic5ccd98a7517b46e768e53d6b0c8fdcda305fb2c
2014-05-14 18:11:23 -07:00
John Reck
f9be77940e Make RenderNodeAnimator and WebView play nice
Change-Id: Ifaefcf510b2d377663fc86f60608d6ec9be8329a
2014-05-05 12:35:30 -07:00
John Reck
52244fff29 Add CanvasProperty for drawCircle
Change-Id: Icbcc030f5033d2094e567d7c519b9d672f2aac1c
2014-05-02 13:43:46 -07:00
John Reck
52622668f9 Use resize, not reserve
Reserve ensures the underlying buffer is the correct size, but
iterating across it is not necessarily valid. Use resize() instead
to ensure that the iterator access is valid

Change-Id: I35ff5f4416bb94cf4ce2c6acf72ffd17ab3e523a
2014-04-30 14:19:56 -07:00
John Reck
e45b1fd03b RenderThread animator support
Change-Id: Icf29098edfdaf7ed550bbe9d49e9eaefb4167084
2014-04-29 10:42:11 -07:00
Chris Craik
cc39e16cb9 Add elevation, Z properties to View
Change-Id: I3dd3b683a66e248a0fdf2ca69d1e962615b0daf9
2014-04-28 14:33:33 -07:00
Chris Craik
717f39c7d9 Merge "Clip TouchFeedbackDrawable effect to receiver Outline" 2014-04-24 00:08:09 +00: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
Chris Craik
e0bb87d4bd Fix translationZ matrix computation
bug:14259972

Ensure that translationZ is applied for true3dTransform property
transformations, even if the node doesn't have any other
transformation properties set.

Additionally, use fuzzy compare for translationZ, similar to
rotationX/Y, since they're expenive to leave set in rounding error
cases.

Change-Id: Idafa4423cc7751a8f433237b1f576aa7abb74f6e
2014-04-23 13:23:30 -07:00
John Reck
860d155f86 Fix issue with bitmap uploading
Bug: 13912749

Change-Id: Ic23fa1d280118dc93dc2716a4a24cc0bbbdca595
2014-04-14 13:17:25 -07:00
Chris Craik
286ffe4b28 Merge "Remove use-after-free signal in RenderNode" 2014-04-11 22:46:20 +00:00
Chris Craik
143912fef8 Remove use-after-free signal in RenderNode
bug:9321162

mDestroyed is no longer useful, as RenderNode is ref counted (not to
mention having its lifecycle significantly redesigned).

Change-Id: I429b9dd7740362c85d6416fbae567f0d47098e4e
2014-04-11 13:48:46 -07:00
John Reck
f7483e3af0 Simplify matrix calculations
Bug: 13913604

Change-Id: I2c0f85a34e1e520050a5a6131306d6b7c352d827
2014-04-11 12:57:53 -07:00
John Reck
f4198b713e Merge hasFunctors & pushStaging into prepareTree
Bug: 13902607
 Fixes synchronous mode for WebView in HardwareLayers

Change-Id: I90de1e26dcfd9b75cc2f03bac72705fc23237b68
2014-04-09 17:00:04 -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
Chris Craik
49e6c73913 Move most TransformationInfo properties to RenderNode
This change dedupes the various properties that were represented both
in TransformationInfo, and RenderProperties on the native side.

RenderNode (and its associated properties) are now permanently
attached to a View in SW or HW. The native copy of these properties
are their sole representation.

Alpha to come in a later CL.

Also fixed issue with copying RenderNode's transform, and added
support of deleting RenderNodes in software rendering.

Change-Id: Ideb6e7f32b780e87aa1c32637c368356b3eee3a1
2014-04-02 18:38:25 -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
08c96b5515 Merge "Disable shadow overdraw avoidance in the inverse clip case" 2014-03-28 18:00:03 +00:00