| 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 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 property_trees->transform_id_to_index_map[id()]); | 579 property_trees->transform_id_to_index_map[id()]); |
| 580 TransformNode* transform_node = | 580 TransformNode* transform_node = |
| 581 property_trees->transform_tree.Node(transform_tree_index()); | 581 property_trees->transform_tree.Node(transform_tree_index()); |
| 582 transform_node->update_post_local_transform(position, transform_origin()); | 582 transform_node->update_post_local_transform(position, transform_origin()); |
| 583 if (transform_node->sticky_position_constraint_id >= 0) { | 583 if (transform_node->sticky_position_constraint_id >= 0) { |
| 584 StickyPositionNodeData* sticky_data = | 584 StickyPositionNodeData* sticky_data = |
| 585 property_trees->transform_tree.StickyPositionData( | 585 property_trees->transform_tree.StickyPositionData( |
| 586 transform_tree_index()); | 586 transform_tree_index()); |
| 587 sticky_data->main_thread_offset = | 587 sticky_data->main_thread_offset = |
| 588 position.OffsetFromOrigin() - | 588 position.OffsetFromOrigin() - |
| 589 sticky_data->constraints.scroll_container_relative_sticky_box_rect | 589 sticky_data->constraints.parent_relative_sticky_box_offset |
| 590 .OffsetFromOrigin(); | 590 .OffsetFromOrigin(); |
| 591 } | 591 } |
| 592 transform_node->needs_local_transform_update = true; | 592 transform_node->needs_local_transform_update = true; |
| 593 transform_node->transform_changed = true; | 593 transform_node->transform_changed = true; |
| 594 layer_tree_->property_trees()->transform_tree.set_needs_update(true); | 594 layer_tree_->property_trees()->transform_tree.set_needs_update(true); |
| 595 SetNeedsCommitNoRebuild(); | 595 SetNeedsCommitNoRebuild(); |
| 596 return; | 596 return; |
| 597 } | 597 } |
| 598 | 598 |
| 599 SetNeedsCommit(); | 599 SetNeedsCommit(); |
| (...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1862 | 1862 |
| 1863 LayerTree* Layer::GetLayerTree() const { | 1863 LayerTree* Layer::GetLayerTree() const { |
| 1864 return layer_tree_; | 1864 return layer_tree_; |
| 1865 } | 1865 } |
| 1866 | 1866 |
| 1867 void Layer::SetLayerIdForTesting(int id) { | 1867 void Layer::SetLayerIdForTesting(int id) { |
| 1868 inputs_.layer_id = id; | 1868 inputs_.layer_id = id; |
| 1869 } | 1869 } |
| 1870 | 1870 |
| 1871 } // namespace cc | 1871 } // namespace cc |
| OLD | NEW |