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

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: Include WebCompositorMutatorClient from WebLayerTreeView to allow unique_ptr usage. Created 4 years, 6 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
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1262
1263 void LayerTreeHost::set_surface_id_namespace(uint32_t id_namespace) { 1263 void LayerTreeHost::set_surface_id_namespace(uint32_t id_namespace) {
1264 surface_id_namespace_ = id_namespace; 1264 surface_id_namespace_ = id_namespace;
1265 } 1265 }
1266 1266
1267 SurfaceSequence LayerTreeHost::CreateSurfaceSequence() { 1267 SurfaceSequence LayerTreeHost::CreateSurfaceSequence() {
1268 return SurfaceSequence(surface_id_namespace_, next_surface_sequence_++); 1268 return SurfaceSequence(surface_id_namespace_, next_surface_sequence_++);
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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
1677 int seq_num = property_trees_.sequence_number; 1682 int seq_num = property_trees_.sequence_number;
1678 LayerTreeHostCommon::CallFunctionForEveryLayer(this, [seq_num](Layer* layer) { 1683 LayerTreeHostCommon::CallFunctionForEveryLayer(this, [seq_num](Layer* layer) {
1679 layer->set_property_tree_sequence_number(seq_num); 1684 layer->set_property_tree_sequence_number(seq_num);
1680 }); 1685 });
1681 1686
1682 surface_id_namespace_ = proto.surface_id_namespace(); 1687 surface_id_namespace_ = proto.surface_id_namespace();
1683 next_surface_sequence_ = proto.next_surface_sequence(); 1688 next_surface_sequence_ = proto.next_surface_sequence();
1684 } 1689 }
1685 1690
1686 } // namespace cc 1691 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698