Chromium Code Reviews| 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)); |