| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/trees/layer_tree_impl.h" | 5 #include "cc/trees/layer_tree_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 948 } | 948 } |
| 949 | 949 |
| 950 void LayerTreeImpl::SetNeedsRedraw() { | 950 void LayerTreeImpl::SetNeedsRedraw() { |
| 951 layer_tree_host_impl_->SetNeedsRedraw(); | 951 layer_tree_host_impl_->SetNeedsRedraw(); |
| 952 } | 952 } |
| 953 | 953 |
| 954 AnimationRegistrar* LayerTreeImpl::GetAnimationRegistrar() const { | 954 AnimationRegistrar* LayerTreeImpl::GetAnimationRegistrar() const { |
| 955 return layer_tree_host_impl_->animation_registrar(); | 955 return layer_tree_host_impl_->animation_registrar(); |
| 956 } | 956 } |
| 957 | 957 |
| 958 void LayerTreeImpl::GetAllTilesAndPrioritiesForTracing( | 958 void LayerTreeImpl::GetAllPrioritizedTilesForTracing( |
| 959 std::map<const Tile*, TilePriority>* tile_map) const { | 959 std::vector<PrioritizedTile>* prioritized_tiles) const { |
| 960 typedef LayerIterator<LayerImpl> LayerIteratorType; | 960 typedef LayerIterator<LayerImpl> LayerIteratorType; |
| 961 LayerIteratorType end = LayerIteratorType::End(&render_surface_layer_list_); | 961 LayerIteratorType end = LayerIteratorType::End(&render_surface_layer_list_); |
| 962 for (LayerIteratorType it = | 962 for (LayerIteratorType it = |
| 963 LayerIteratorType::Begin(&render_surface_layer_list_); | 963 LayerIteratorType::Begin(&render_surface_layer_list_); |
| 964 it != end; | 964 it != end; |
| 965 ++it) { | 965 ++it) { |
| 966 if (!it.represents_itself()) | 966 if (!it.represents_itself()) |
| 967 continue; | 967 continue; |
| 968 LayerImpl* layer_impl = *it; | 968 LayerImpl* layer_impl = *it; |
| 969 layer_impl->GetAllTilesAndPrioritiesForTracing(tile_map); | 969 layer_impl->GetAllPrioritizedTilesForTracing(prioritized_tiles); |
| 970 } | 970 } |
| 971 } | 971 } |
| 972 | 972 |
| 973 void LayerTreeImpl::AsValueInto(base::trace_event::TracedValue* state) const { | 973 void LayerTreeImpl::AsValueInto(base::trace_event::TracedValue* state) const { |
| 974 TracedValue::MakeDictIntoImplicitSnapshot(state, "cc::LayerTreeImpl", this); | 974 TracedValue::MakeDictIntoImplicitSnapshot(state, "cc::LayerTreeImpl", this); |
| 975 state->SetInteger("source_frame_number", source_frame_number_); | 975 state->SetInteger("source_frame_number", source_frame_number_); |
| 976 | 976 |
| 977 state->BeginDictionary("root_layer"); | 977 state->BeginDictionary("root_layer"); |
| 978 root_layer_->AsValueInto(state); | 978 root_layer_->AsValueInto(state); |
| 979 state->EndDictionary(); | 979 state->EndDictionary(); |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1565 scoped_ptr<PendingPageScaleAnimation> pending_animation) { | 1565 scoped_ptr<PendingPageScaleAnimation> pending_animation) { |
| 1566 pending_page_scale_animation_ = pending_animation.Pass(); | 1566 pending_page_scale_animation_ = pending_animation.Pass(); |
| 1567 } | 1567 } |
| 1568 | 1568 |
| 1569 scoped_ptr<PendingPageScaleAnimation> | 1569 scoped_ptr<PendingPageScaleAnimation> |
| 1570 LayerTreeImpl::TakePendingPageScaleAnimation() { | 1570 LayerTreeImpl::TakePendingPageScaleAnimation() { |
| 1571 return pending_page_scale_animation_.Pass(); | 1571 return pending_page_scale_animation_.Pass(); |
| 1572 } | 1572 } |
| 1573 | 1573 |
| 1574 } // namespace cc | 1574 } // namespace cc |
| OLD | NEW |