OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1108 proxy_->SetAuthoritativeVSyncInterval(interval); | 1108 proxy_->SetAuthoritativeVSyncInterval(interval); |
1109 } | 1109 } |
1110 | 1110 |
1111 void LayerTreeHost::RecordFrameTimingEvents( | 1111 void LayerTreeHost::RecordFrameTimingEvents( |
1112 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, | 1112 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, |
1113 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) { | 1113 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) { |
1114 client_->RecordFrameTimingEvents(std::move(composite_events), | 1114 client_->RecordFrameTimingEvents(std::move(composite_events), |
1115 std::move(main_frame_events)); | 1115 std::move(main_frame_events)); |
1116 } | 1116 } |
1117 | 1117 |
| 1118 void LayerTreeHost::SetLayerTreeMutator(LayerTreeMutator* mutator) { |
| 1119 proxy_->SetMutator(mutator); |
| 1120 } |
| 1121 |
1118 Layer* LayerTreeHost::LayerById(int id) const { | 1122 Layer* LayerTreeHost::LayerById(int id) const { |
1119 LayerIdMap::const_iterator iter = layer_id_map_.find(id); | 1123 LayerIdMap::const_iterator iter = layer_id_map_.find(id); |
1120 return iter != layer_id_map_.end() ? iter->second : NULL; | 1124 return iter != layer_id_map_.end() ? iter->second : NULL; |
1121 } | 1125 } |
1122 | 1126 |
1123 void LayerTreeHost::RegisterLayer(Layer* layer) { | 1127 void LayerTreeHost::RegisterLayer(Layer* layer) { |
1124 DCHECK(!LayerById(layer->id())); | 1128 DCHECK(!LayerById(layer->id())); |
1125 DCHECK(!in_paint_layer_contents_); | 1129 DCHECK(!in_paint_layer_contents_); |
1126 layer_id_map_[layer->id()] = layer; | 1130 layer_id_map_[layer->id()] = layer; |
1127 if (animation_host_) | 1131 if (animation_host_) |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1442 | 1446 |
1443 // It is required to create new PropertyTrees before deserializing it. | 1447 // It is required to create new PropertyTrees before deserializing it. |
1444 property_trees_ = PropertyTrees(); | 1448 property_trees_ = PropertyTrees(); |
1445 property_trees_.FromProtobuf(proto.property_trees()); | 1449 property_trees_.FromProtobuf(proto.property_trees()); |
1446 | 1450 |
1447 surface_id_namespace_ = proto.surface_id_namespace(); | 1451 surface_id_namespace_ = proto.surface_id_namespace(); |
1448 next_surface_sequence_ = proto.next_surface_sequence(); | 1452 next_surface_sequence_ = proto.next_surface_sequence(); |
1449 } | 1453 } |
1450 | 1454 |
1451 } // namespace cc | 1455 } // namespace cc |
OLD | NEW |