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

Side by Side Diff: cc/layers/layer_proto_converter.h

Issue 2251143002: cc: Reland Move data to LayerTree from LayerTreeHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better fix? Created 4 years, 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CC_LAYERS_LAYER_PROTO_CONVERTER_H_ 5 #ifndef CC_LAYERS_LAYER_PROTO_CONVERTER_H_
6 #define CC_LAYERS_LAYER_PROTO_CONVERTER_H_ 6 #define CC_LAYERS_LAYER_PROTO_CONVERTER_H_
7 7
8 #include <unordered_map> 8 #include <unordered_map>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 16 matching lines...) Expand all
27 proto::LayerNode* root_node); 27 proto::LayerNode* root_node);
28 28
29 // Recursively iterate over the given LayerNode proto and read the structure 29 // Recursively iterate over the given LayerNode proto and read the structure
30 // into a local Layer structure, re-using existing Layers. returns the new 30 // into a local Layer structure, re-using existing Layers. returns the new
31 // root Layer after updating the hierarchy (may be the same as 31 // root Layer after updating the hierarchy (may be the same as
32 // |existing_root|). |existing_root| may be null, which might happen during 32 // |existing_root|). |existing_root| may be null, which might happen during
33 // the first deserialize. 33 // the first deserialize.
34 static scoped_refptr<Layer> DeserializeLayerHierarchy( 34 static scoped_refptr<Layer> DeserializeLayerHierarchy(
35 const scoped_refptr<Layer> existing_root, 35 const scoped_refptr<Layer> existing_root,
36 const proto::LayerNode& root_node, 36 const proto::LayerNode& root_node,
37 LayerTreeHost* layer_tree_host); 37 LayerTreeHost* layer_tree);
vmpstr 2016/08/17 20:28:15 nit: this is still a layer_tree_host.
38 38
39 // Serializes the properties of all the dirty nodes in the Layer hierarchy. 39 // Serializes the properties of all the dirty nodes in the Layer hierarchy.
40 // The proto::LayerUpdate will contain all nodes that are dirty. These nodes 40 // The proto::LayerUpdate will contain all nodes that are dirty. These nodes
41 // will contain the list of dirty properties. This function also resets the 41 // will contain the list of dirty properties. This function also resets the
42 // layers that need push properties set. 42 // layers that need push properties set.
43 static void SerializeLayerProperties(LayerTreeHost* host, 43 static void SerializeLayerProperties(LayerTreeHost* host,
44 proto::LayerUpdate* layer_update); 44 proto::LayerUpdate* layer_update);
45 45
46 // Iterate over all updated layers from the LayerUpdate, and update the 46 // Iterate over all updated layers from the LayerUpdate, and update the
47 // local Layers. |existing_root| must not be null, as that will make it 47 // local Layers. |existing_root| must not be null, as that will make it
(...skipping 24 matching lines...) Expand all
72 // and special layers to |layer_id_map|. 72 // and special layers to |layer_id_map|.
73 // TODO(vmpstr): LayerIdMap ref counts layers, so this function needs to deal 73 // TODO(vmpstr): LayerIdMap ref counts layers, so this function needs to deal
74 // with ref counted objects instead of iterating over raw pointers. 74 // with ref counted objects instead of iterating over raw pointers.
75 static void RecursivelyFindAllLayers(Layer* root_layer, 75 static void RecursivelyFindAllLayers(Layer* root_layer,
76 LayerIdMap* layer_id_map); 76 LayerIdMap* layer_id_map);
77 }; 77 };
78 78
79 } // namespace cc 79 } // namespace cc
80 80
81 #endif // CC_LAYERS_LAYER_PROTO_CONVERTER_H_ 81 #endif // CC_LAYERS_LAYER_PROTO_CONVERTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698