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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 void SetPinchZoomHorizontalLayerId(int layer_id); | 189 void SetPinchZoomHorizontalLayerId(int layer_id); |
190 void SetPinchZoomVerticalLayerId(int layer_id); | 190 void SetPinchZoomVerticalLayerId(int layer_id); |
191 | 191 |
192 void DidBeginScroll(); | 192 void DidBeginScroll(); |
193 void DidUpdateScroll(); | 193 void DidUpdateScroll(); |
194 void DidEndScroll(); | 194 void DidEndScroll(); |
195 | 195 |
196 void SetRootLayerScrollOffsetDelegate( | 196 void SetRootLayerScrollOffsetDelegate( |
197 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate); | 197 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate); |
198 | 198 |
199 void SetLatencyInfo(const LatencyInfo& latency_info); | 199 void SetLatencyInfo(const ui::LatencyInfo& latency_info); |
200 const LatencyInfo& GetLatencyInfo(); | 200 const ui::LatencyInfo& GetLatencyInfo(); |
201 void ClearLatencyInfo(); | 201 void ClearLatencyInfo(); |
202 | 202 |
203 protected: | 203 protected: |
204 explicit LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); | 204 explicit LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); |
205 | 205 |
206 void UpdateSolidColorScrollbars(); | 206 void UpdateSolidColorScrollbars(); |
207 | 207 |
208 // Hide existence of pinch-zoom scrollbars. | 208 // Hide existence of pinch-zoom scrollbars. |
209 void UpdatePinchZoomScrollbars(); | 209 void UpdatePinchZoomScrollbars(); |
210 void FadeInPinchZoomScrollbars(); | 210 void FadeInPinchZoomScrollbars(); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 LayerImplList render_surface_layer_list_; | 245 LayerImplList render_surface_layer_list_; |
246 | 246 |
247 bool contents_textures_purged_; | 247 bool contents_textures_purged_; |
248 bool viewport_size_invalid_; | 248 bool viewport_size_invalid_; |
249 bool needs_update_draw_properties_; | 249 bool needs_update_draw_properties_; |
250 | 250 |
251 // In impl-side painting mode, this is true when the tree may contain | 251 // In impl-side painting mode, this is true when the tree may contain |
252 // structural differences relative to the active tree. | 252 // structural differences relative to the active tree. |
253 bool needs_full_tree_sync_; | 253 bool needs_full_tree_sync_; |
254 | 254 |
255 LatencyInfo latency_info_; | 255 ui::LatencyInfo latency_info_; |
256 | 256 |
257 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 257 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
258 }; | 258 }; |
259 | 259 |
260 } // namespace cc | 260 } // namespace cc |
261 | 261 |
262 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 262 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
OLD | NEW |