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" |
13 #include "cc/layers/layer_impl.h" | 14 #include "cc/layers/layer_impl.h" |
14 | 15 |
15 #if defined(COMPILER_GCC) | 16 #if defined(COMPILER_GCC) |
16 namespace BASE_HASH_NAMESPACE { | 17 namespace BASE_HASH_NAMESPACE { |
17 template<> | 18 template<> |
18 struct hash<cc::LayerImpl*> { | 19 struct hash<cc::LayerImpl*> { |
19 size_t operator()(cc::LayerImpl* ptr) const { | 20 size_t operator()(cc::LayerImpl* ptr) const { |
20 return hash<size_t>()(reinterpret_cast<size_t>(ptr)); | 21 return hash<size_t>()(reinterpret_cast<size_t>(ptr)); |
21 } | 22 } |
22 }; | 23 }; |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 // Useful for debug assertions, probably shouldn't be used for anything else. | 191 // Useful for debug assertions, probably shouldn't be used for anything else. |
191 Proxy* proxy() const; | 192 Proxy* proxy() const; |
192 | 193 |
193 void SetPinchZoomHorizontalLayerId(int layer_id); | 194 void SetPinchZoomHorizontalLayerId(int layer_id); |
194 void SetPinchZoomVerticalLayerId(int layer_id); | 195 void SetPinchZoomVerticalLayerId(int layer_id); |
195 | 196 |
196 void DidBeginScroll(); | 197 void DidBeginScroll(); |
197 void DidUpdateScroll(); | 198 void DidUpdateScroll(); |
198 void DidEndScroll(); | 199 void DidEndScroll(); |
199 | 200 |
| 201 void SetLatencyInfo(const LatencyInfo& latency_info); |
| 202 const LatencyInfo& GetLatencyInfo(); |
| 203 void ClearLatencyInfo(); |
| 204 |
200 protected: | 205 protected: |
201 explicit LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); | 206 explicit LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); |
202 | 207 |
203 void UpdateSolidColorScrollbars(); | 208 void UpdateSolidColorScrollbars(); |
204 | 209 |
205 // Hide existence of pinch-zoom scrollbars. | 210 // Hide existence of pinch-zoom scrollbars. |
206 void UpdatePinchZoomScrollbars(); | 211 void UpdatePinchZoomScrollbars(); |
207 void FadeInPinchZoomScrollbars(); | 212 void FadeInPinchZoomScrollbars(); |
208 void FadeOutPinchZoomScrollbars(); | 213 void FadeOutPinchZoomScrollbars(); |
209 ScrollbarLayerImpl* PinchZoomScrollbarHorizontal(); | 214 ScrollbarLayerImpl* PinchZoomScrollbarHorizontal(); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 LayerImplList render_surface_layer_list_; | 246 LayerImplList render_surface_layer_list_; |
242 | 247 |
243 bool contents_textures_purged_; | 248 bool contents_textures_purged_; |
244 bool viewport_size_invalid_; | 249 bool viewport_size_invalid_; |
245 bool needs_update_draw_properties_; | 250 bool needs_update_draw_properties_; |
246 | 251 |
247 // In impl-side painting mode, this is true when the tree may contain | 252 // In impl-side painting mode, this is true when the tree may contain |
248 // structural differences relative to the active tree. | 253 // structural differences relative to the active tree. |
249 bool needs_full_tree_sync_; | 254 bool needs_full_tree_sync_; |
250 | 255 |
| 256 LatencyInfo latency_info_; |
| 257 |
251 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 258 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
252 }; | 259 }; |
253 | 260 |
254 } // namespace cc | 261 } // namespace cc |
255 | 262 |
256 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 263 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
OLD | NEW |