mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Specs: Change from the every-frame-walk for animations on dead nodes to just relying on actual animation values and insert/remove notifications.
Review URL: https://codereview.chromium.org/810003003
This commit is contained in:
parent
d3fbe58e94
commit
a055bbfa6d
@ -496,8 +496,10 @@ taking into account shadow trees and child distribution, and the tree
|
||||
rooted at the document's RenderNode.
|
||||
|
||||
If you come across a node that doesn't have an assigned RenderNode,
|
||||
then create one and mark it "isNew", and place it in the appropriate
|
||||
place in the RenderTree tree, after any nodes marked isGhost.
|
||||
then create one, placing it in the appropriate place in the RenderTree
|
||||
tree, after any nodes marked isGhost=true, with ownerLayoutManager
|
||||
pointing to the parent RenderNode's layoutManager, and then, if
|
||||
autoreap is false on the ownerLayoutManager, mark it "isNew".
|
||||
|
||||
For each element, if the node's needsManager is true, call
|
||||
getLayoutManager() on the element, and if that's not null, and if the
|
||||
@ -522,6 +524,11 @@ be faster.)
|
||||
When an Element is to be removed from its parent, regardless of the
|
||||
above, the node's renderNode attribute should be nulled out.
|
||||
|
||||
When a RenderNode is added with isNew=true, call its parent
|
||||
RenderNode's LayoutManager's childAdded() callback. When a a
|
||||
RenderNode has its isGhost property set to true, then call it's parent
|
||||
RenderNode's LayoutManager's childRemoved() callback.
|
||||
|
||||
|
||||
```javascript
|
||||
callback any ValueResolver (any value, String propertyName, RenderNode node, Float containerWidth, Float containerHeight);
|
||||
@ -668,6 +675,10 @@ class LayoutManager : EventTarget {
|
||||
virtual void release(RenderNode victim);
|
||||
// called when the RenderNode was removed from the tree
|
||||
|
||||
virtual void childAdded(RenderNode child);
|
||||
virtual void childRemoved(RenderNode child);
|
||||
// called when a child has its isNew or isGhost attributes set respectively
|
||||
|
||||
void setChildPosition(child, x, y); // sets child.x, child.y
|
||||
void setChildX(child, y); // sets child.x
|
||||
void setChildY(child, y); // sets child.y
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user