Chromium Code Reviews| 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 262 | 262 |
| 263 bool has_render_surface; | 263 bool has_render_surface; |
| 264 bool has_copy_request; | 264 bool has_copy_request; |
| 265 bool has_background_filters; | 265 bool has_background_filters; |
| 266 bool is_drawn; | 266 bool is_drawn; |
| 267 bool has_animated_opacity; | 267 bool has_animated_opacity; |
| 268 // We need to track changes to effects on the compositor to compute damage | 268 // We need to track changes to effects on the compositor to compute damage |
| 269 // rect. | 269 // rect. |
| 270 bool effect_changed; | 270 bool effect_changed; |
| 271 int num_copy_requests_in_subtree; | 271 int num_copy_requests_in_subtree; |
| 272 bool has_unclipped_descendants; | |
| 272 int transform_id; | 273 int transform_id; |
| 273 int clip_id; | 274 int clip_id; |
| 275 int target_id; | |
| 276 gfx::Rect clip_rect; | |
| 274 | 277 |
| 275 bool operator==(const EffectNodeData& other) const; | 278 bool operator==(const EffectNodeData& other) const; |
| 276 | 279 |
| 277 void ToProtobuf(proto::TreeNode* proto) const; | 280 void ToProtobuf(proto::TreeNode* proto) const; |
| 278 void FromProtobuf(const proto::TreeNode& proto); | 281 void FromProtobuf(const proto::TreeNode& proto); |
| 279 }; | 282 }; |
| 280 | 283 |
| 281 typedef TreeNode<EffectNodeData> EffectNode; | 284 typedef TreeNode<EffectNodeData> EffectNode; |
| 282 | 285 |
| 283 struct CC_EXPORT ScrollNodeData { | 286 struct CC_EXPORT ScrollNodeData { |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 382 // relationship. Transforms between other pairs of nodes may only be computed | 385 // relationship. Transforms between other pairs of nodes may only be computed |
| 383 // if the following condition holds: let id1 the larger id and let id2 be the | 386 // if the following condition holds: let id1 the larger id and let id2 be the |
| 384 // other id; then the nearest ancestor of node id1 whose id is smaller than | 387 // other id; then the nearest ancestor of node id1 whose id is smaller than |
| 385 // id2 is the lowest common ancestor of the pair of nodes, and the transform | 388 // id2 is the lowest common ancestor of the pair of nodes, and the transform |
| 386 // from this lowest common ancestor to node id2 is only a 2d translation. | 389 // from this lowest common ancestor to node id2 is only a 2d translation. |
| 387 bool ComputeTransform(int source_id, | 390 bool ComputeTransform(int source_id, |
| 388 int dest_id, | 391 int dest_id, |
| 389 gfx::Transform* transform) const; | 392 gfx::Transform* transform) const; |
| 390 | 393 |
| 391 // Computes the change of basis transform from node |source_id| to |dest_id|, | 394 // Computes the change of basis transform from node |source_id| to |dest_id|, |
| 395 // including any sublayer scale at |dest_id| but not including sublayer scale | |
| 396 // at |source_id|. The function returns false iff the inverse of a singular | |
| 397 // transform was used (and the result should, therefore, not be trusted). | |
| 398 bool ComputeTransformWithDifferenceInSublayerScale( | |
|
ajuma
2016/03/15 14:59:56
Seems unused?
weiliangc
2016/03/15 15:29:36
Ah thanks for the catch. Removed.
| |
| 399 int source_id, | |
| 400 int dest_id, | |
| 401 gfx::Transform* transform) const; | |
| 402 | |
| 403 // Computes the change of basis transform from node |source_id| to |dest_id|, | |
| 392 // including any sublayer scale at |dest_id|. The function returns false iff | 404 // including any sublayer scale at |dest_id|. The function returns false iff |
| 393 // the inverse of a singular transform was used (and the result should, | 405 // the inverse of a singular transform was used (and the result should, |
| 394 // therefore, not be trusted). | 406 // therefore, not be trusted). |
| 395 bool ComputeTransformWithDestinationSublayerScale( | 407 bool ComputeTransformWithDestinationSublayerScale( |
| 396 int source_id, | 408 int source_id, |
| 397 int dest_id, | 409 int dest_id, |
| 398 gfx::Transform* transform) const; | 410 gfx::Transform* transform) const; |
| 399 | 411 |
| 400 // Computes the change of basis transform from node |source_id| to |dest_id|, | 412 // Computes the change of basis transform from node |source_id| to |dest_id|, |
| 401 // including any sublayer scale at |source_id|. The function returns false | 413 // including any sublayer scale at |source_id|. The function returns false |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 652 | 664 |
| 653 private: | 665 private: |
| 654 gfx::Vector2dF inner_viewport_container_bounds_delta_; | 666 gfx::Vector2dF inner_viewport_container_bounds_delta_; |
| 655 gfx::Vector2dF outer_viewport_container_bounds_delta_; | 667 gfx::Vector2dF outer_viewport_container_bounds_delta_; |
| 656 gfx::Vector2dF inner_viewport_scroll_bounds_delta_; | 668 gfx::Vector2dF inner_viewport_scroll_bounds_delta_; |
| 657 }; | 669 }; |
| 658 | 670 |
| 659 } // namespace cc | 671 } // namespace cc |
| 660 | 672 |
| 661 #endif // CC_TREES_PROPERTY_TREE_H_ | 673 #endif // CC_TREES_PROPERTY_TREE_H_ |
| OLD | NEW |