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_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 3159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3170 FrameData* frame, | 3170 FrameData* frame, |
3171 base::trace_event::TracedValue* state) const { | 3171 base::trace_event::TracedValue* state) const { |
3172 if (this->pending_tree_) { | 3172 if (this->pending_tree_) { |
3173 state->BeginDictionary("activation_state"); | 3173 state->BeginDictionary("activation_state"); |
3174 ActivationStateAsValueInto(state); | 3174 ActivationStateAsValueInto(state); |
3175 state->EndDictionary(); | 3175 state->EndDictionary(); |
3176 } | 3176 } |
3177 MathUtil::AddToTracedValue("device_viewport_size", device_viewport_size_, | 3177 MathUtil::AddToTracedValue("device_viewport_size", device_viewport_size_, |
3178 state); | 3178 state); |
3179 | 3179 |
3180 std::map<const Tile*, TilePriority> tile_map; | 3180 std::vector<PrioritizedTile> prioritized_tiles; |
3181 active_tree_->GetAllTilesAndPrioritiesForTracing(&tile_map); | 3181 active_tree_->GetAllPrioritizedTilesForTracing(&prioritized_tiles); |
3182 if (pending_tree_) | 3182 if (pending_tree_) |
3183 pending_tree_->GetAllTilesAndPrioritiesForTracing(&tile_map); | 3183 pending_tree_->GetAllPrioritizedTilesForTracing(&prioritized_tiles); |
3184 | 3184 |
3185 state->BeginArray("active_tiles"); | 3185 state->BeginArray("active_tiles"); |
3186 for (const auto& pair : tile_map) { | 3186 for (const auto& prioritized_tile : prioritized_tiles) { |
3187 const Tile* tile = pair.first; | |
3188 const TilePriority& priority = pair.second; | |
3189 | |
3190 state->BeginDictionary(); | 3187 state->BeginDictionary(); |
3191 tile->AsValueWithPriorityInto(priority, state); | 3188 prioritized_tile.AsValueInto(state); |
3192 state->EndDictionary(); | 3189 state->EndDictionary(); |
3193 } | 3190 } |
3194 state->EndArray(); | 3191 state->EndArray(); |
3195 | 3192 |
3196 if (tile_manager_) { | 3193 if (tile_manager_) { |
3197 state->BeginDictionary("tile_manager_basic_state"); | 3194 state->BeginDictionary("tile_manager_basic_state"); |
3198 tile_manager_->BasicStateAsValueInto(state); | 3195 tile_manager_->BasicStateAsValueInto(state); |
3199 state->EndDictionary(); | 3196 state->EndDictionary(); |
3200 } | 3197 } |
3201 state->BeginDictionary("active_tree"); | 3198 state->BeginDictionary("active_tree"); |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3399 new_target.SetToMin(layer_impl->MaxScrollOffset()); | 3396 new_target.SetToMin(layer_impl->MaxScrollOffset()); |
3400 | 3397 |
3401 curve->UpdateTarget( | 3398 curve->UpdateTarget( |
3402 animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time) | 3399 animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time) |
3403 .InSecondsF(), | 3400 .InSecondsF(), |
3404 new_target); | 3401 new_target); |
3405 | 3402 |
3406 return true; | 3403 return true; |
3407 } | 3404 } |
3408 } // namespace cc | 3405 } // namespace cc |
OLD | NEW |