OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_IMPL_H_ | 5 #ifndef CC_TREES_LAYER_TREE_IMPL_H_ |
6 #define CC_TREES_LAYER_TREE_IMPL_H_ | 6 #define CC_TREES_LAYER_TREE_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/hash_tables.h" | 11 #include "base/hash_tables.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "cc/debug/latency_info.h" | |
14 #include "cc/layers/layer_impl.h" | 13 #include "cc/layers/layer_impl.h" |
| 14 #include "ui/base/latency_info.h" |
15 | 15 |
16 #if defined(COMPILER_GCC) | 16 #if defined(COMPILER_GCC) |
17 namespace BASE_HASH_NAMESPACE { | 17 namespace BASE_HASH_NAMESPACE { |
18 template<> | 18 template<> |
19 struct hash<cc::LayerImpl*> { | 19 struct hash<cc::LayerImpl*> { |
20 size_t operator()(cc::LayerImpl* ptr) const { | 20 size_t operator()(cc::LayerImpl* ptr) const { |
21 return hash<size_t>()(reinterpret_cast<size_t>(ptr)); | 21 return hash<size_t>()(reinterpret_cast<size_t>(ptr)); |
22 } | 22 } |
23 }; | 23 }; |
24 } // namespace BASE_HASH_NAMESPACE | 24 } // namespace BASE_HASH_NAMESPACE |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 bool ViewportSizeInvalid() const; | 179 bool ViewportSizeInvalid() const; |
180 void SetViewportSizeInvalid(); | 180 void SetViewportSizeInvalid(); |
181 void ResetViewportSizeInvalid(); | 181 void ResetViewportSizeInvalid(); |
182 | 182 |
183 // Useful for debug assertions, probably shouldn't be used for anything else. | 183 // Useful for debug assertions, probably shouldn't be used for anything else. |
184 Proxy* proxy() const; | 184 Proxy* proxy() const; |
185 | 185 |
186 void SetRootLayerScrollOffsetDelegate( | 186 void SetRootLayerScrollOffsetDelegate( |
187 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate); | 187 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate); |
188 | 188 |
189 void SetLatencyInfo(const LatencyInfo& latency_info); | 189 void SetLatencyInfo(const ui::LatencyInfo& latency_info); |
190 const LatencyInfo& GetLatencyInfo(); | 190 const ui::LatencyInfo& GetLatencyInfo(); |
191 void ClearLatencyInfo(); | 191 void ClearLatencyInfo(); |
192 | 192 |
193 void WillModifyTilePriorities(); | 193 void WillModifyTilePriorities(); |
194 | 194 |
195 protected: | 195 protected: |
196 explicit LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); | 196 explicit LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); |
197 | 197 |
198 void UpdateSolidColorScrollbars(); | 198 void UpdateSolidColorScrollbars(); |
199 | 199 |
200 void UpdateRootScrollLayerSizeDelta(); | 200 void UpdateRootScrollLayerSizeDelta(); |
(...skipping 25 matching lines...) Expand all Loading... |
226 LayerImplList render_surface_layer_list_; | 226 LayerImplList render_surface_layer_list_; |
227 | 227 |
228 bool contents_textures_purged_; | 228 bool contents_textures_purged_; |
229 bool viewport_size_invalid_; | 229 bool viewport_size_invalid_; |
230 bool needs_update_draw_properties_; | 230 bool needs_update_draw_properties_; |
231 | 231 |
232 // In impl-side painting mode, this is true when the tree may contain | 232 // In impl-side painting mode, this is true when the tree may contain |
233 // structural differences relative to the active tree. | 233 // structural differences relative to the active tree. |
234 bool needs_full_tree_sync_; | 234 bool needs_full_tree_sync_; |
235 | 235 |
236 LatencyInfo latency_info_; | 236 ui::LatencyInfo latency_info_; |
237 | 237 |
238 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 238 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
239 }; | 239 }; |
240 | 240 |
241 } // namespace cc | 241 } // namespace cc |
242 | 242 |
243 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 243 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
OLD | NEW |