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 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
816 transform_node->scroll_offset = CurrentScrollOffset(); | 816 transform_node->scroll_offset = CurrentScrollOffset(); |
817 transform_node->needs_local_transform_update = true; | 817 transform_node->needs_local_transform_update = true; |
818 property_trees->transform_tree.set_needs_update(true); | 818 property_trees->transform_tree.set_needs_update(true); |
819 needs_rebuild = false; | 819 needs_rebuild = false; |
820 } | 820 } |
821 | 821 |
822 if (needs_rebuild) | 822 if (needs_rebuild) |
823 property_trees->needs_rebuild = true; | 823 property_trees->needs_rebuild = true; |
824 | 824 |
825 if (!inputs_.did_scroll_callback.is_null()) | 825 if (!inputs_.did_scroll_callback.is_null()) |
826 inputs_.did_scroll_callback.Run(); | 826 inputs_.did_scroll_callback.Run(scroll_offset); |
| 827 |
827 // The callback could potentially change the layer structure: | 828 // The callback could potentially change the layer structure: |
828 // "this" may have been destroyed during the process. | 829 // "this" may have been destroyed during the process. |
829 } | 830 } |
830 | 831 |
831 void Layer::SetScrollClipLayerId(int clip_layer_id) { | 832 void Layer::SetScrollClipLayerId(int clip_layer_id) { |
832 DCHECK(IsPropertyChangeAllowed()); | 833 DCHECK(IsPropertyChangeAllowed()); |
833 if (inputs_.scroll_clip_layer_id == clip_layer_id) | 834 if (inputs_.scroll_clip_layer_id == clip_layer_id) |
834 return; | 835 return; |
835 inputs_.scroll_clip_layer_id = clip_layer_id; | 836 inputs_.scroll_clip_layer_id = clip_layer_id; |
836 SetNeedsCommit(); | 837 SetNeedsCommit(); |
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1573 ->num_copy_requests_in_subtree; | 1574 ->num_copy_requests_in_subtree; |
1574 } | 1575 } |
1575 | 1576 |
1576 gfx::Transform Layer::screen_space_transform() const { | 1577 gfx::Transform Layer::screen_space_transform() const { |
1577 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId); | 1578 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId); |
1578 return draw_property_utils::ScreenSpaceTransform( | 1579 return draw_property_utils::ScreenSpaceTransform( |
1579 this, layer_tree_host_->property_trees()->transform_tree); | 1580 this, layer_tree_host_->property_trees()->transform_tree); |
1580 } | 1581 } |
1581 | 1582 |
1582 } // namespace cc | 1583 } // namespace cc |
OLD | NEW |