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

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: review comments addressed 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
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 2ac7ebe5b413b97a3b82e1f3cffb58d0e5a213ce..ea9cd0bdaa6e5bdf6c8dc0ad9dec3ddc969e5a7c 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"
@@ -294,6 +295,14 @@ void LayerTreeHost::FinishCommitOnImplThread(LayerTreeHostImpl* host_impl) {
sync_tree->set_source_frame_number(source_frame_number());
+ bool is_new_trace;
danakj 2015/03/16 19:06:49 Can you move this up above the |sync_tree| variabl
+ TRACE_EVENT_IS_NEW_TRACE(&is_new_trace);
+ if (is_new_trace &&
+ frame_viewer_instrumentation::IsTracingLayerTreeSnapshots()) {
+ LayerTreeHostCommon::CallFunctionForSubtree(
+ root_layer(), [](Layer* layer) { layer->DidBeginTracing(); });
+ }
+
if (needs_full_tree_sync_) {
sync_tree->SetRootLayer(TreeSynchronizer::SynchronizeTrees(
root_layer(), sync_tree->DetachLayerTree(), sync_tree));

Powered by Google App Engine
This is Rietveld 408576698