OLD | NEW |
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 #ifndef CC_TREES_PROPERTY_TREE_H_ | 5 #ifndef CC_TREES_PROPERTY_TREE_H_ |
6 #define CC_TREES_PROPERTY_TREE_H_ | 6 #define CC_TREES_PROPERTY_TREE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <unordered_map> | 10 #include <unordered_map> |
(...skipping 12 matching lines...) Expand all Loading... |
23 class EffectNodeData; | 23 class EffectNodeData; |
24 class PropertyTree; | 24 class PropertyTree; |
25 class PropertyTrees; | 25 class PropertyTrees; |
26 class ScrollNodeData; | 26 class ScrollNodeData; |
27 class TranformNodeData; | 27 class TranformNodeData; |
28 class TransformTreeData; | 28 class TransformTreeData; |
29 class TreeNode; | 29 class TreeNode; |
30 } | 30 } |
31 | 31 |
32 class LayerTreeImpl; | 32 class LayerTreeImpl; |
| 33 class RenderSurfaceImpl; |
33 class ScrollState; | 34 class ScrollState; |
34 struct ScrollAndScaleSet; | 35 struct ScrollAndScaleSet; |
35 | 36 |
36 // ------------------------------*IMPORTANT*--------------------------------- | 37 // ------------------------------*IMPORTANT*--------------------------------- |
37 // Each class declared here has a corresponding proto defined in | 38 // Each class declared here has a corresponding proto defined in |
38 // cc/proto/property_tree.proto. When making any changes to a class structure | 39 // cc/proto/property_tree.proto. When making any changes to a class structure |
39 // including addition/deletion/updation of a field, please also make the | 40 // including addition/deletion/updation of a field, please also make the |
40 // change to its proto and the ToProtobuf and FromProtobuf methods for that | 41 // change to its proto and the ToProtobuf and FromProtobuf methods for that |
41 // class. | 42 // class. |
42 | 43 |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 typedef TreeNode<ClipNodeData> ClipNode; | 255 typedef TreeNode<ClipNodeData> ClipNode; |
255 | 256 |
256 struct CC_EXPORT EffectNodeData { | 257 struct CC_EXPORT EffectNodeData { |
257 EffectNodeData(); | 258 EffectNodeData(); |
258 EffectNodeData(const EffectNodeData& other); | 259 EffectNodeData(const EffectNodeData& other); |
259 | 260 |
260 float opacity; | 261 float opacity; |
261 float screen_space_opacity; | 262 float screen_space_opacity; |
262 | 263 |
263 bool has_render_surface; | 264 bool has_render_surface; |
| 265 RenderSurfaceImpl* render_surface; |
264 bool has_copy_request; | 266 bool has_copy_request; |
265 bool has_background_filters; | 267 bool has_background_filters; |
266 bool node_or_ancestor_has_background_filters; | 268 bool node_or_ancestor_has_background_filters; |
267 bool to_screen_opacity_is_animated; | 269 bool to_screen_opacity_is_animated; |
268 bool hidden_by_backface_visibility; | 270 bool hidden_by_backface_visibility; |
269 bool double_sided; | 271 bool double_sided; |
270 bool is_drawn; | 272 bool is_drawn; |
271 bool has_animated_opacity; | 273 bool has_animated_opacity; |
272 // We need to track changes to effects on the compositor to compute damage | 274 // We need to track changes to effects on the compositor to compute damage |
273 // rect. | 275 // rect. |
274 bool effect_changed; | 276 bool effect_changed; |
275 int num_copy_requests_in_subtree; | 277 int num_copy_requests_in_subtree; |
276 int transform_id; | 278 int transform_id; |
277 int clip_id; | 279 int clip_id; |
278 // For a node that creates a render surface, target_id is its own id. | 280 // Effect node id of which this effect contributes to. |
279 int target_id; | 281 int target_id; |
280 | 282 |
281 bool operator==(const EffectNodeData& other) const; | 283 bool operator==(const EffectNodeData& other) const; |
282 | 284 |
283 void ToProtobuf(proto::TreeNode* proto) const; | 285 void ToProtobuf(proto::TreeNode* proto) const; |
284 void FromProtobuf(const proto::TreeNode& proto); | 286 void FromProtobuf(const proto::TreeNode& proto); |
285 }; | 287 }; |
286 | 288 |
287 typedef TreeNode<EffectNodeData> EffectNode; | 289 typedef TreeNode<EffectNodeData> EffectNode; |
288 | 290 |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 | 680 |
679 private: | 681 private: |
680 gfx::Vector2dF inner_viewport_container_bounds_delta_; | 682 gfx::Vector2dF inner_viewport_container_bounds_delta_; |
681 gfx::Vector2dF outer_viewport_container_bounds_delta_; | 683 gfx::Vector2dF outer_viewport_container_bounds_delta_; |
682 gfx::Vector2dF inner_viewport_scroll_bounds_delta_; | 684 gfx::Vector2dF inner_viewport_scroll_bounds_delta_; |
683 }; | 685 }; |
684 | 686 |
685 } // namespace cc | 687 } // namespace cc |
686 | 688 |
687 #endif // CC_TREES_PROPERTY_TREE_H_ | 689 #endif // CC_TREES_PROPERTY_TREE_H_ |
OLD | NEW |