| OLD | NEW |
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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 "cc/layers/layer.h" | 5 #include "cc/layers/layer.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 property_trees->transform_id_to_index_map[id()]); | 578 property_trees->transform_id_to_index_map[id()]); |
| 579 TransformNode* transform_node = | 579 TransformNode* transform_node = |
| 580 property_trees->transform_tree.Node(transform_tree_index()); | 580 property_trees->transform_tree.Node(transform_tree_index()); |
| 581 transform_node->update_post_local_transform(position, transform_origin()); | 581 transform_node->update_post_local_transform(position, transform_origin()); |
| 582 if (transform_node->sticky_position_constraint_id >= 0) { | 582 if (transform_node->sticky_position_constraint_id >= 0) { |
| 583 StickyPositionNodeData* sticky_data = | 583 StickyPositionNodeData* sticky_data = |
| 584 property_trees->transform_tree.StickyPositionData( | 584 property_trees->transform_tree.StickyPositionData( |
| 585 transform_tree_index()); | 585 transform_tree_index()); |
| 586 sticky_data->main_thread_offset = | 586 sticky_data->main_thread_offset = |
| 587 position.OffsetFromOrigin() - | 587 position.OffsetFromOrigin() - |
| 588 sticky_data->constraints.scroll_container_relative_sticky_box_rect | 588 sticky_data->constraints.parent_relative_sticky_box_offset |
| 589 .OffsetFromOrigin(); | 589 .OffsetFromOrigin(); |
| 590 } | 590 } |
| 591 transform_node->needs_local_transform_update = true; | 591 transform_node->needs_local_transform_update = true; |
| 592 transform_node->transform_changed = true; | 592 transform_node->transform_changed = true; |
| 593 layer_tree_->property_trees()->transform_tree.set_needs_update(true); | 593 layer_tree_->property_trees()->transform_tree.set_needs_update(true); |
| 594 SetNeedsCommitNoRebuild(); | 594 SetNeedsCommitNoRebuild(); |
| 595 return; | 595 return; |
| 596 } | 596 } |
| 597 | 597 |
| 598 SetNeedsCommit(); | 598 SetNeedsCommit(); |
| (...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1840 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId); | 1840 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId); |
| 1841 return draw_property_utils::ScreenSpaceTransform( | 1841 return draw_property_utils::ScreenSpaceTransform( |
| 1842 this, layer_tree_->property_trees()->transform_tree); | 1842 this, layer_tree_->property_trees()->transform_tree); |
| 1843 } | 1843 } |
| 1844 | 1844 |
| 1845 LayerTree* Layer::GetLayerTree() const { | 1845 LayerTree* Layer::GetLayerTree() const { |
| 1846 return layer_tree_; | 1846 return layer_tree_; |
| 1847 } | 1847 } |
| 1848 | 1848 |
| 1849 } // namespace cc | 1849 } // namespace cc |
| OLD | NEW |