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

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: Created 5 years, 10 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 | « no previous file | no next file » | 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 426927aaaba8b18b75a68fdc0c77979e39d026fd..68bfe251020c0e08331fbb75baa6118c14cfabd8 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -215,6 +215,10 @@ static void LayerTreeHostOnOutputSurfaceCreatedCallback(Layer* layer) {
layer->OnOutputSurfaceCreated();
}
+static void SetNeedsPushPropertiesForLayer(Layer* layer) {
+ layer->SetNeedsPushProperties();
+}
+
void LayerTreeHost::DeleteContentsTexturesOnImplThread(
ResourceProvider* resource_provider) {
DCHECK(proxy_->IsImplThread());
@@ -298,6 +302,23 @@ void LayerTreeHost::FinishCommitOnImplThread(LayerTreeHostImpl* host_impl) {
sync_tree->set_source_frame_number(source_frame_number());
+ bool is_new_trace;
+ TRACE_EVENT_IS_NEW_TRACE(&is_new_trace);
+ if (is_new_trace) {
+ // We're about to start tracing snaphsots of layer tree, so force
+ // push properties for all layers to propagate LayerDebugInfo to
danakj 2015/02/20 17:13:18 AFAICT LayerDebugInfo is not an actual type name,
+ // the impl side.
danakj 2015/02/20 17:13:18 Can you help fill me in on how this DebugInfo work
+ bool will_snapshot_layer_tree;
+ TRACE_EVENT_CATEGORY_GROUP_ENABLED(
+ TRACE_DISABLED_BY_DEFAULT("cc.debug") "," TRACE_DISABLED_BY_DEFAULT(
+ "devtools.timeline.layers"),
danakj 2015/02/20 17:13:18 If it's reasonable, I would much prefer we expose
+ &will_snapshot_layer_tree);
+ if (will_snapshot_layer_tree) {
+ LayerTreeHostCommon::CallFunctionForSubtree(
+ root_layer(), base::Bind(SetNeedsPushPropertiesForLayer));
danakj 2015/02/20 17:13:18 I think that walking all the layers to make us wal
+ }
+ }
+
if (needs_full_tree_sync_) {
sync_tree->SetRootLayer(TreeSynchronizer::SynchronizeTrees(
root_layer(), sync_tree->DetachLayerTree(), sync_tree));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698