Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CC_TREES_TRANSFORM_NODE_H_ | 5 #ifndef CC_TREES_TRANSFORM_NODE_H_ |
| 6 #define CC_TREES_TRANSFORM_NODE_H_ | 6 #define CC_TREES_TRANSFORM_NODE_H_ |
| 7 | 7 |
| 8 #include "cc/cc_export.h" | 8 #include "cc/cc_export.h" |
| 9 #include "ui/gfx/geometry/point_f.h" | 9 #include "ui/gfx/geometry/point_f.h" |
| 10 #include "ui/gfx/geometry/scroll_offset.h" | 10 #include "ui/gfx/geometry/scroll_offset.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 62 int source_node_id; | 62 int source_node_id; |
| 63 | 63 |
| 64 // This id determines which 3d rendering context the node is in. 0 is a | 64 // This id determines which 3d rendering context the node is in. 0 is a |
| 65 // special value and indicates that the node is not in any 3d rendering | 65 // special value and indicates that the node is not in any 3d rendering |
| 66 // context. | 66 // context. |
| 67 int sorting_context_id; | 67 int sorting_context_id; |
| 68 | 68 |
| 69 // TODO(vollick): will be moved when accelerated effects are implemented. | 69 // TODO(vollick): will be moved when accelerated effects are implemented. |
| 70 bool needs_local_transform_update : 1; | 70 bool needs_local_transform_update : 1; |
| 71 | 71 |
| 72 // Whether this node or any ancestor has a potentially running | |
| 73 // (i.e., irrespective of exact timeline) transform animation or an | |
| 74 // invertible transform. Defaults to true. See also | |
|
chrishtr
2017/05/13 01:07:18
Defaults to true is I think a bit misleading here,
wkorman
2017/05/15 19:48:27
Brief update -- working on this since this morning
| |
| 75 // TransformTree::UpdateNodeAndAncestorsAreAnimatedOrInvertible. | |
| 72 bool node_and_ancestors_are_animated_or_invertible : 1; | 76 bool node_and_ancestors_are_animated_or_invertible : 1; |
|
pdr.
2017/05/13 02:25:33
This might be cleaner if we just tracked ancestor_
enne (OOO)
2017/05/15 17:14:51
Agreed on both counts.
wkorman
2017/05/15 19:48:27
Acknowledged.
wkorman
2017/05/15 23:53:17
Current logic in TransformTree::UpdateNodeAndAnces
jaydasika
2017/05/15 23:53:54
We already have the separate bools you have mentio
wkorman
2017/05/16 00:28:01
Is the below equivalent?
T2.node_and_ancestors_
jaydasika
2017/05/16 01:48:02
It's not equivalent. For case 2 in my example, if
| |
| 73 | 77 |
| 74 bool is_invertible : 1; | 78 bool is_invertible : 1; |
| 79 // Whether the transform from this node to the screen is | |
| 80 // invertible. Defaults to true. See also | |
| 81 // TransformTree::UpdateScreenSpaceTransform. | |
| 75 bool ancestors_are_invertible : 1; | 82 bool ancestors_are_invertible : 1; |
| 76 | 83 |
| 84 // Whether this node has a potentially running (i.e., irrespective | |
| 85 // of exact timeline) transform animation. Defaults to false. | |
|
chrishtr
2017/05/13 01:07:18
Defaults to false, vs true above for
node_and_ance
wkorman
2017/05/15 19:48:27
Acknowledged.
| |
| 77 bool has_potential_animation : 1; | 86 bool has_potential_animation : 1; |
| 87 // Whether this node has a currently running transform | |
| 88 // animation. Defaults to false. | |
|
enne (OOO)
2017/05/15 17:14:51
I'm not sure I really like all this "defaults to f
wkorman
2017/05/15 19:48:27
Removed all notes about defaults in these comments
| |
| 78 bool is_currently_animating : 1; | 89 bool is_currently_animating : 1; |
| 90 // Whether this node *or an ancestor* has a potentially running | |
| 91 // (i.e., irrespective of exact timeline) transform | |
| 92 // animation. Defaults to false. See also | |
| 93 // TransformTree::UpdateAnimationProperties. | |
| 79 bool to_screen_is_potentially_animated : 1; | 94 bool to_screen_is_potentially_animated : 1; |
| 95 // Whether all animations on this transform node are simple | |
| 96 // translations. Defaults to true. Used when computing animation | |
|
enne (OOO)
2017/05/15 17:14:51
I'm not sure that explaining where this is used ad
wkorman
2017/05/15 19:48:27
Removed this and similar above.
| |
| 97 // scale factor for caching. See also | |
| 98 // PropertyTrees::GetAnimationScales. | |
| 80 bool has_only_translation_animations : 1; | 99 bool has_only_translation_animations : 1; |
| 81 | 100 |
| 82 // Flattening, when needed, is only applied to a node's inherited transform, | 101 // Flattening, when needed, is only applied to a node's inherited transform, |
| 83 // never to its local transform. | 102 // never to its local transform. |
| 84 bool flattens_inherited_transform : 1; | 103 bool flattens_inherited_transform : 1; |
| 85 | 104 |
| 86 // This is true if the to_parent transform at every node on the path to the | 105 // This is true if the to_parent transform at every node on the path to the |
| 87 // root is flat. | 106 // root is flat. |
| 88 bool node_and_ancestors_are_flat : 1; | 107 bool node_and_ancestors_are_flat : 1; |
| 89 | 108 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 150 gfx::Transform to_screen; | 169 gfx::Transform to_screen; |
| 151 | 170 |
| 152 bool is_showing_backface : 1; | 171 bool is_showing_backface : 1; |
| 153 | 172 |
| 154 bool operator==(const TransformCachedNodeData& other) const; | 173 bool operator==(const TransformCachedNodeData& other) const; |
| 155 }; | 174 }; |
| 156 | 175 |
| 157 } // namespace cc | 176 } // namespace cc |
| 158 | 177 |
| 159 #endif // CC_TREES_TRANSFORM_NODE_H_ | 178 #endif // CC_TREES_TRANSFORM_NODE_H_ |
| OLD | NEW |