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 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 3127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3138 FrameData* frame, | 3138 FrameData* frame, |
3139 base::debug::TracedValue* state) const { | 3139 base::debug::TracedValue* state) const { |
3140 if (this->pending_tree_) { | 3140 if (this->pending_tree_) { |
3141 state->BeginDictionary("activation_state"); | 3141 state->BeginDictionary("activation_state"); |
3142 ActivationStateAsValueInto(state); | 3142 ActivationStateAsValueInto(state); |
3143 state->EndDictionary(); | 3143 state->EndDictionary(); |
3144 } | 3144 } |
3145 state->BeginDictionary("device_viewport_size"); | 3145 state->BeginDictionary("device_viewport_size"); |
3146 MathUtil::AddToTracedValue(device_viewport_size_, state); | 3146 MathUtil::AddToTracedValue(device_viewport_size_, state); |
3147 state->EndDictionary(); | 3147 state->EndDictionary(); |
| 3148 |
| 3149 std::set<const Tile*> tiles; |
| 3150 active_tree_->GetAllTilesForTracing(&tiles); |
| 3151 if (pending_tree_) |
| 3152 pending_tree_->GetAllTilesForTracing(&tiles); |
| 3153 |
| 3154 state->BeginArray("active_tiles"); |
| 3155 for (std::set<const Tile*>::const_iterator it = tiles.begin(); |
| 3156 it != tiles.end(); |
| 3157 ++it) { |
| 3158 const Tile* tile = *it; |
| 3159 |
| 3160 state->BeginDictionary(); |
| 3161 tile->AsValueInto(state); |
| 3162 state->EndDictionary(); |
| 3163 } |
| 3164 state->EndArray(); |
| 3165 |
3148 if (tile_manager_) { | 3166 if (tile_manager_) { |
3149 state->BeginArray("tiles"); | |
3150 tile_manager_->AllTilesAsValueInto(state); | |
3151 state->EndArray(); | |
3152 | |
3153 state->BeginDictionary("tile_manager_basic_state"); | 3167 state->BeginDictionary("tile_manager_basic_state"); |
3154 tile_manager_->BasicStateAsValueInto(state); | 3168 tile_manager_->BasicStateAsValueInto(state); |
3155 state->EndDictionary(); | 3169 state->EndDictionary(); |
3156 } | 3170 } |
3157 state->BeginDictionary("active_tree"); | 3171 state->BeginDictionary("active_tree"); |
3158 active_tree_->AsValueInto(state); | 3172 active_tree_->AsValueInto(state); |
3159 state->EndDictionary(); | 3173 state->EndDictionary(); |
3160 if (pending_tree_) { | 3174 if (pending_tree_) { |
3161 state->BeginDictionary("pending_tree"); | 3175 state->BeginDictionary("pending_tree"); |
3162 pending_tree_->AsValueInto(state); | 3176 pending_tree_->AsValueInto(state); |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3338 } | 3352 } |
3339 | 3353 |
3340 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 3354 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
3341 std::vector<PictureLayerImpl*>::iterator it = | 3355 std::vector<PictureLayerImpl*>::iterator it = |
3342 std::find(picture_layers_.begin(), picture_layers_.end(), layer); | 3356 std::find(picture_layers_.begin(), picture_layers_.end(), layer); |
3343 DCHECK(it != picture_layers_.end()); | 3357 DCHECK(it != picture_layers_.end()); |
3344 picture_layers_.erase(it); | 3358 picture_layers_.erase(it); |
3345 } | 3359 } |
3346 | 3360 |
3347 } // namespace cc | 3361 } // namespace cc |
OLD | NEW |