Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 1945813002: cc: Make LayerTreeImpl dump layer list to FrameViewer and Devtools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve comments Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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(
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | third_party/WebKit/LayoutTests/inspector/tracing/layer-tree-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698