Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Side by Side Diff: cc/trees/property_tree.cc

Issue 1624693004: cc:: Add transform nodes at boundaries of 3d rendering contexts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/property_tree.h ('k') | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include <stddef.h> 5 #include <stddef.h>
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 template class PropertyTree<TransformNode>; 119 template class PropertyTree<TransformNode>;
120 template class PropertyTree<ClipNode>; 120 template class PropertyTree<ClipNode>;
121 template class PropertyTree<EffectNode>; 121 template class PropertyTree<EffectNode>;
122 template class PropertyTree<ScrollNode>; 122 template class PropertyTree<ScrollNode>;
123 123
124 TransformNodeData::TransformNodeData() 124 TransformNodeData::TransformNodeData()
125 : target_id(-1), 125 : target_id(-1),
126 content_target_id(-1), 126 content_target_id(-1),
127 source_node_id(-1), 127 source_node_id(-1),
128 sorting_context_id(0),
128 needs_local_transform_update(true), 129 needs_local_transform_update(true),
129 is_invertible(true), 130 is_invertible(true),
130 ancestors_are_invertible(true), 131 ancestors_are_invertible(true),
131 is_animated(false), 132 is_animated(false),
132 to_screen_is_animated(false), 133 to_screen_is_animated(false),
133 has_only_translation_animations(true), 134 has_only_translation_animations(true),
134 to_screen_has_scale_animation(false), 135 to_screen_has_scale_animation(false),
135 flattens_inherited_transform(false), 136 flattens_inherited_transform(false),
136 node_and_ancestors_are_flat(true), 137 node_and_ancestors_are_flat(true),
137 node_and_ancestors_have_only_integer_translation(true), 138 node_and_ancestors_have_only_integer_translation(true),
(...skipping 14 matching lines...) Expand all
152 } 153 }
153 154
154 bool TransformNodeData::operator==(const TransformNodeData& other) const { 155 bool TransformNodeData::operator==(const TransformNodeData& other) const {
155 return pre_local == other.pre_local && local == other.local && 156 return pre_local == other.pre_local && local == other.local &&
156 post_local == other.post_local && to_parent == other.to_parent && 157 post_local == other.post_local && to_parent == other.to_parent &&
157 to_target == other.to_target && from_target == other.from_target && 158 to_target == other.to_target && from_target == other.from_target &&
158 to_screen == other.to_screen && from_screen == other.from_screen && 159 to_screen == other.to_screen && from_screen == other.from_screen &&
159 target_id == other.target_id && 160 target_id == other.target_id &&
160 content_target_id == other.content_target_id && 161 content_target_id == other.content_target_id &&
161 source_node_id == other.source_node_id && 162 source_node_id == other.source_node_id &&
163 sorting_context_id == other.sorting_context_id &&
162 needs_local_transform_update == other.needs_local_transform_update && 164 needs_local_transform_update == other.needs_local_transform_update &&
163 is_invertible == other.is_invertible && 165 is_invertible == other.is_invertible &&
164 ancestors_are_invertible == other.ancestors_are_invertible && 166 ancestors_are_invertible == other.ancestors_are_invertible &&
165 is_animated == other.is_animated && 167 is_animated == other.is_animated &&
166 to_screen_is_animated == other.to_screen_is_animated && 168 to_screen_is_animated == other.to_screen_is_animated &&
167 has_only_translation_animations == 169 has_only_translation_animations ==
168 other.has_only_translation_animations && 170 other.has_only_translation_animations &&
169 to_screen_has_scale_animation == other.to_screen_has_scale_animation && 171 to_screen_has_scale_animation == other.to_screen_has_scale_animation &&
170 flattens_inherited_transform == other.flattens_inherited_transform && 172 flattens_inherited_transform == other.flattens_inherited_transform &&
171 node_and_ancestors_are_flat == other.node_and_ancestors_are_flat && 173 node_and_ancestors_are_flat == other.node_and_ancestors_are_flat &&
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 231
230 TransformToProto(to_target, data->mutable_to_target()); 232 TransformToProto(to_target, data->mutable_to_target());
231 TransformToProto(from_target, data->mutable_from_target()); 233 TransformToProto(from_target, data->mutable_from_target());
232 234
233 TransformToProto(to_screen, data->mutable_to_screen()); 235 TransformToProto(to_screen, data->mutable_to_screen());
234 TransformToProto(from_screen, data->mutable_from_screen()); 236 TransformToProto(from_screen, data->mutable_from_screen());
235 237
236 data->set_target_id(target_id); 238 data->set_target_id(target_id);
237 data->set_content_target_id(content_target_id); 239 data->set_content_target_id(content_target_id);
238 data->set_source_node_id(source_node_id); 240 data->set_source_node_id(source_node_id);
241 data->set_sorting_context_id(sorting_context_id);
239 242
240 data->set_needs_local_transform_update(needs_local_transform_update); 243 data->set_needs_local_transform_update(needs_local_transform_update);
241 244
242 data->set_is_invertible(is_invertible); 245 data->set_is_invertible(is_invertible);
243 data->set_ancestors_are_invertible(ancestors_are_invertible); 246 data->set_ancestors_are_invertible(ancestors_are_invertible);
244 247
245 data->set_is_animated(is_animated); 248 data->set_is_animated(is_animated);
246 data->set_to_screen_is_animated(to_screen_is_animated); 249 data->set_to_screen_is_animated(to_screen_is_animated);
247 data->set_has_only_translation_animations(has_only_translation_animations); 250 data->set_has_only_translation_animations(has_only_translation_animations);
248 data->set_to_screen_has_scale_animation(to_screen_has_scale_animation); 251 data->set_to_screen_has_scale_animation(to_screen_has_scale_animation);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 296
294 to_target = ProtoToTransform(data.to_target()); 297 to_target = ProtoToTransform(data.to_target());
295 from_target = ProtoToTransform(data.from_target()); 298 from_target = ProtoToTransform(data.from_target());
296 299
297 to_screen = ProtoToTransform(data.to_screen()); 300 to_screen = ProtoToTransform(data.to_screen());
298 from_screen = ProtoToTransform(data.from_screen()); 301 from_screen = ProtoToTransform(data.from_screen());
299 302
300 target_id = data.target_id(); 303 target_id = data.target_id();
301 content_target_id = data.content_target_id(); 304 content_target_id = data.content_target_id();
302 source_node_id = data.source_node_id(); 305 source_node_id = data.source_node_id();
306 sorting_context_id = data.sorting_context_id();
303 307
304 needs_local_transform_update = data.needs_local_transform_update(); 308 needs_local_transform_update = data.needs_local_transform_update();
305 309
306 is_invertible = data.is_invertible(); 310 is_invertible = data.is_invertible();
307 ancestors_are_invertible = data.ancestors_are_invertible(); 311 ancestors_are_invertible = data.ancestors_are_invertible();
308 312
309 is_animated = data.is_animated(); 313 is_animated = data.is_animated();
310 to_screen_is_animated = data.to_screen_is_animated(); 314 to_screen_is_animated = data.to_screen_is_animated();
311 has_only_translation_animations = data.has_only_translation_animations(); 315 has_only_translation_animations = data.has_only_translation_animations();
312 to_screen_has_scale_animation = data.to_screen_has_scale_animation(); 316 to_screen_has_scale_animation = data.to_screen_has_scale_animation();
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 effect_tree.FromProtobuf(proto.effect_tree()); 1265 effect_tree.FromProtobuf(proto.effect_tree());
1262 clip_tree.FromProtobuf(proto.clip_tree()); 1266 clip_tree.FromProtobuf(proto.clip_tree());
1263 scroll_tree.FromProtobuf(proto.scroll_tree()); 1267 scroll_tree.FromProtobuf(proto.scroll_tree());
1264 1268
1265 needs_rebuild = proto.needs_rebuild(); 1269 needs_rebuild = proto.needs_rebuild();
1266 non_root_surfaces_enabled = proto.non_root_surfaces_enabled(); 1270 non_root_surfaces_enabled = proto.non_root_surfaces_enabled();
1267 sequence_number = proto.sequence_number(); 1271 sequence_number = proto.sequence_number();
1268 } 1272 }
1269 1273
1270 } // namespace cc 1274 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/property_tree.h ('k') | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698