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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 924973003: CC: Force push properties for all layers when tracing is started (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added root_layer() check Created 5 years, 9 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
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 8a3e644bb1109fe7348501cde4fee91fd810f34e..7814dac0609a1bda4d3d79c12dc5e796ace5eafa 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -21,6 +21,7 @@
#include "cc/animation/layer_animation_controller.h"
#include "cc/base/math_util.h"
#include "cc/debug/devtools_instrumentation.h"
+#include "cc/debug/frame_viewer_instrumentation.h"
#include "cc/debug/rendering_stats_instrumentation.h"
#include "cc/input/layer_selection_bound.h"
#include "cc/input/page_scale_animation.h"
@@ -268,6 +269,15 @@ void LayerTreeHost::FinishCommitOnImplThread(LayerTreeHostImpl* host_impl) {
contents_texture_manager_->ReduceMemory(host_impl->resource_provider());
}
+ bool is_new_trace;
+ TRACE_EVENT_IS_NEW_TRACE(&is_new_trace);
+ if (is_new_trace &&
+ frame_viewer_instrumentation::IsTracingLayerTreeSnapshots() &&
+ root_layer()) {
+ LayerTreeHostCommon::CallFunctionForSubtree(
+ root_layer(), [](Layer* layer) { layer->DidBeginTracing(); });
+ }
+
LayerTreeImpl* sync_tree = host_impl->sync_tree();
if (next_commit_forces_redraw_) {
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698