Index: cc/trees/layer_tree_impl.cc |
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc |
index e8291ae66391837468c1a272b2f67ba66d8bb6b7..674e9b185861147593d3644897b37c08ad9df747 100644 |
--- a/cc/trees/layer_tree_impl.cc |
+++ b/cc/trees/layer_tree_impl.cc |
@@ -432,11 +432,11 @@ void LayerTreeImpl::MoveChangeTrackingToLayers() { |
} |
} |
-LayerListIterator<LayerImpl> LayerTreeImpl::begin() { |
+LayerListIterator<LayerImpl> LayerTreeImpl::begin() const { |
return LayerListIterator<LayerImpl>(root_layer_); |
} |
-LayerListIterator<LayerImpl> LayerTreeImpl::end() { |
+LayerListIterator<LayerImpl> LayerTreeImpl::end() const { |
return LayerListIterator<LayerImpl>(nullptr); |
} |
@@ -1284,10 +1284,6 @@ void LayerTreeImpl::AsValueInto(base::trace_event::TracedValue* state) const { |
TracedValue::MakeDictIntoImplicitSnapshot(state, "cc::LayerTreeImpl", this); |
state->SetInteger("source_frame_number", source_frame_number_); |
- state->BeginDictionary("root_layer"); |
- root_layer_->AsValueInto(state); |
- state->EndDictionary(); |
- |
state->BeginArray("render_surface_layer_list"); |
LayerIterator end = LayerIterator::End(&render_surface_layer_list_); |
for (LayerIterator it = LayerIterator::Begin(&render_surface_layer_list_); |
@@ -1307,6 +1303,14 @@ void LayerTreeImpl::AsValueInto(base::trace_event::TracedValue* state) const { |
for (const auto& swap_promise : pinned_swap_promise_list_) |
state->AppendDouble(swap_promise->TraceId()); |
state->EndArray(); |
+ |
+ state->BeginArray("layers"); |
+ for (auto* layer : *this) { |
+ state->BeginDictionary(); |
+ layer->AsValueInto(state); |
+ state->EndDictionary(); |
+ } |
+ state->EndArray(); |
} |
bool LayerTreeImpl::DistributeRootScrollOffset( |