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

Side by Side Diff: cc/trees/layer_tree_host.cc

Issue 1895873006: compositor-worker: Initialize CW machinery plumbing to compositor and fire CW rAF callbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename to StubCompositorMutator. Created 4 years, 7 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 unified diff | Download patch
OLDNEW
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 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after
1258 1258
1259 SurfaceSequence LayerTreeHost::CreateSurfaceSequence() { 1259 SurfaceSequence LayerTreeHost::CreateSurfaceSequence() {
1260 return SurfaceSequence(surface_id_namespace_, next_surface_sequence_++); 1260 return SurfaceSequence(surface_id_namespace_, next_surface_sequence_++);
1261 } 1261 }
1262 1262
1263 void LayerTreeHost::SetAuthoritativeVSyncInterval( 1263 void LayerTreeHost::SetAuthoritativeVSyncInterval(
1264 const base::TimeDelta& interval) { 1264 const base::TimeDelta& interval) {
1265 proxy_->SetAuthoritativeVSyncInterval(interval); 1265 proxy_->SetAuthoritativeVSyncInterval(interval);
1266 } 1266 }
1267 1267
1268 void LayerTreeHost::SetLayerTreeMutator(
1269 std::unique_ptr<LayerTreeMutator> mutator) {
1270 proxy_->SetMutator(std::move(mutator));
1271 }
1272
1268 Layer* LayerTreeHost::LayerById(int id) const { 1273 Layer* LayerTreeHost::LayerById(int id) const {
1269 LayerIdMap::const_iterator iter = layer_id_map_.find(id); 1274 LayerIdMap::const_iterator iter = layer_id_map_.find(id);
1270 return iter != layer_id_map_.end() ? iter->second : NULL; 1275 return iter != layer_id_map_.end() ? iter->second : NULL;
1271 } 1276 }
1272 1277
1273 void LayerTreeHost::AddLayerShouldPushProperties(Layer* layer) { 1278 void LayerTreeHost::AddLayerShouldPushProperties(Layer* layer) {
1274 layers_that_should_push_properties_.insert(layer); 1279 layers_that_should_push_properties_.insert(layer);
1275 } 1280 }
1276 1281
1277 void LayerTreeHost::RemoveLayerShouldPushProperties(Layer* layer) { 1282 void LayerTreeHost::RemoveLayerShouldPushProperties(Layer* layer) {
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
1634 int seq_num = property_trees_.sequence_number; 1639 int seq_num = property_trees_.sequence_number;
1635 LayerTreeHostCommon::CallFunctionForEveryLayer(this, [seq_num](Layer* layer) { 1640 LayerTreeHostCommon::CallFunctionForEveryLayer(this, [seq_num](Layer* layer) {
1636 layer->set_property_tree_sequence_number(seq_num); 1641 layer->set_property_tree_sequence_number(seq_num);
1637 }); 1642 });
1638 1643
1639 surface_id_namespace_ = proto.surface_id_namespace(); 1644 surface_id_namespace_ = proto.surface_id_namespace();
1640 next_surface_sequence_ = proto.next_surface_sequence(); 1645 next_surface_sequence_ = proto.next_surface_sequence();
1641 } 1646 }
1642 1647
1643 } // namespace cc 1648 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698