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

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: Add big fat TODOs in scheduler code to implement proper idle task scheduling and ensure GC is runni… 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 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 1261
1262 SurfaceSequence LayerTreeHost::CreateSurfaceSequence() { 1262 SurfaceSequence LayerTreeHost::CreateSurfaceSequence() {
1263 return SurfaceSequence(surface_id_namespace_, next_surface_sequence_++); 1263 return SurfaceSequence(surface_id_namespace_, next_surface_sequence_++);
1264 } 1264 }
1265 1265
1266 void LayerTreeHost::SetAuthoritativeVSyncInterval( 1266 void LayerTreeHost::SetAuthoritativeVSyncInterval(
1267 const base::TimeDelta& interval) { 1267 const base::TimeDelta& interval) {
1268 proxy_->SetAuthoritativeVSyncInterval(interval); 1268 proxy_->SetAuthoritativeVSyncInterval(interval);
1269 } 1269 }
1270 1270
1271 void LayerTreeHost::SetLayerTreeMutator(
1272 std::unique_ptr<LayerTreeMutator> mutator) {
1273 proxy_->SetMutator(std::move(mutator));
1274 }
1275
1271 Layer* LayerTreeHost::LayerById(int id) const { 1276 Layer* LayerTreeHost::LayerById(int id) const {
1272 LayerIdMap::const_iterator iter = layer_id_map_.find(id); 1277 LayerIdMap::const_iterator iter = layer_id_map_.find(id);
1273 return iter != layer_id_map_.end() ? iter->second : NULL; 1278 return iter != layer_id_map_.end() ? iter->second : NULL;
1274 } 1279 }
1275 1280
1276 void LayerTreeHost::AddLayerShouldPushProperties(Layer* layer) { 1281 void LayerTreeHost::AddLayerShouldPushProperties(Layer* layer) {
1277 layers_that_should_push_properties_.insert(layer); 1282 layers_that_should_push_properties_.insert(layer);
1278 } 1283 }
1279 1284
1280 void LayerTreeHost::RemoveLayerShouldPushProperties(Layer* layer) { 1285 void LayerTreeHost::RemoveLayerShouldPushProperties(Layer* layer) {
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
1637 int seq_num = property_trees_.sequence_number; 1642 int seq_num = property_trees_.sequence_number;
1638 LayerTreeHostCommon::CallFunctionForEveryLayer(this, [seq_num](Layer* layer) { 1643 LayerTreeHostCommon::CallFunctionForEveryLayer(this, [seq_num](Layer* layer) {
1639 layer->set_property_tree_sequence_number(seq_num); 1644 layer->set_property_tree_sequence_number(seq_num);
1640 }); 1645 });
1641 1646
1642 surface_id_namespace_ = proto.surface_id_namespace(); 1647 surface_id_namespace_ = proto.surface_id_namespace();
1643 next_surface_sequence_ = proto.next_surface_sequence(); 1648 next_surface_sequence_ = proto.next_surface_sequence();
1644 } 1649 }
1645 1650
1646 } // namespace cc 1651 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698