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

Side by Side Diff: cc/trees/layer_tree.h

Issue 2323423002: cc: Add SwapPromiseManager and SurfaceSequenceGenerator. (Closed)
Patch Set: tests Created 4 years, 3 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/latency_info_swap_promise_monitor.cc ('k') | cc/trees/layer_tree.cc » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_TREES_LAYER_TREE_H_ 5 #ifndef CC_TREES_LAYER_TREE_H_
6 #define CC_TREES_LAYER_TREE_H_ 6 #define CC_TREES_LAYER_TREE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <unordered_map> 9 #include <unordered_map>
10 #include <unordered_set> 10 #include <unordered_set>
(...skipping 22 matching lines...) Expand all
33 } // namespace proto 33 } // namespace proto
34 34
35 class AnimationHost; 35 class AnimationHost;
36 class HeadsUpDisplayLayer; 36 class HeadsUpDisplayLayer;
37 class Layer; 37 class Layer;
38 class LayerTreeHost; 38 class LayerTreeHost;
39 class LayerTreeImpl; 39 class LayerTreeImpl;
40 class LayerTreeSettings; 40 class LayerTreeSettings;
41 struct PendingPageScaleAnimation; 41 struct PendingPageScaleAnimation;
42 class UIResourceManager; 42 class UIResourceManager;
43 class SwapPromiseManager;
44 class SurfaceSequenceGenerator;
43 45
44 class CC_EXPORT LayerTree : public MutatorHostClient { 46 class CC_EXPORT LayerTree : public MutatorHostClient {
45 public: 47 public:
46 using LayerSet = std::unordered_set<Layer*>; 48 using LayerSet = std::unordered_set<Layer*>;
47 using LayerIdMap = std::unordered_map<int, Layer*>; 49 using LayerIdMap = std::unordered_map<int, Layer*>;
48 50
49 LayerTree(std::unique_ptr<AnimationHost> animation_host, 51 LayerTree(std::unique_ptr<AnimationHost> animation_host,
50 LayerTreeHost* layer_tree_host); 52 LayerTreeHost* layer_tree_host);
51 virtual ~LayerTree(); 53 virtual ~LayerTree();
52 54
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 float device_scale_factor() const { return inputs_.device_scale_factor; } 117 float device_scale_factor() const { return inputs_.device_scale_factor; }
116 118
117 void SetPaintedDeviceScaleFactor(float painted_device_scale_factor); 119 void SetPaintedDeviceScaleFactor(float painted_device_scale_factor);
118 120
119 // Used externally by blink for setting the PropertyTrees when 121 // Used externally by blink for setting the PropertyTrees when
120 // |settings_.use_layer_lists| is true. This is a SPV2 setting. 122 // |settings_.use_layer_lists| is true. This is a SPV2 setting.
121 PropertyTrees* property_trees() { return &property_trees_; } 123 PropertyTrees* property_trees() { return &property_trees_; }
122 124
123 void SetNeedsDisplayOnAllLayers(); 125 void SetNeedsDisplayOnAllLayers();
124 126
125 UIResourceManager* GetUIResourceManager() const;
126 const LayerTreeSettings& GetSettings() const;
127
128 // Methods which should only be used internally in cc ------------------ 127 // Methods which should only be used internally in cc ------------------
129 void RegisterLayer(Layer* layer); 128 void RegisterLayer(Layer* layer);
130 void UnregisterLayer(Layer* layer); 129 void UnregisterLayer(Layer* layer);
131 Layer* LayerById(int id) const; 130 Layer* LayerById(int id) const;
132 131
133 bool UpdateLayers(const LayerList& update_layer_list, 132 bool UpdateLayers(const LayerList& update_layer_list,
134 bool* content_is_suitable_for_gpu); 133 bool* content_is_suitable_for_gpu);
135 bool in_paint_layer_contents() const { return in_paint_layer_contents_; } 134 bool in_paint_layer_contents() const { return in_paint_layer_contents_; }
136 135
137 void AddLayerShouldPushProperties(Layer* layer); 136 void AddLayerShouldPushProperties(Layer* layer);
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 279
281 std::unique_ptr<AnimationHost> animation_host_; 280 std::unique_ptr<AnimationHost> animation_host_;
282 LayerTreeHost* layer_tree_host_; 281 LayerTreeHost* layer_tree_host_;
283 282
284 DISALLOW_COPY_AND_ASSIGN(LayerTree); 283 DISALLOW_COPY_AND_ASSIGN(LayerTree);
285 }; 284 };
286 285
287 } // namespace cc 286 } // namespace cc
288 287
289 #endif // CC_TREES_LAYER_TREE_H_ 288 #endif // CC_TREES_LAYER_TREE_H_
OLDNEW
« no previous file with comments | « cc/trees/latency_info_swap_promise_monitor.cc ('k') | cc/trees/layer_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698