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 <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 29 matching lines...) Expand all Loading... |
40 class LayerTreeImpl; | 40 class LayerTreeImpl; |
41 class LayerTreeSettings; | 41 class LayerTreeSettings; |
42 class MemoryHistory; | 42 class MemoryHistory; |
43 class OutputSurface; | 43 class OutputSurface; |
44 class PaintTimeCounter; | 44 class PaintTimeCounter; |
45 class Proxy; | 45 class Proxy; |
46 class ResourceProvider; | 46 class ResourceProvider; |
47 class TileManager; | 47 class TileManager; |
48 class UIResourceRequest; | 48 class UIResourceRequest; |
49 struct RendererCapabilities; | 49 struct RendererCapabilities; |
| 50 struct SelectionHandle; |
50 | 51 |
51 typedef std::list<UIResourceRequest> UIResourceRequestQueue; | 52 typedef std::list<UIResourceRequest> UIResourceRequestQueue; |
52 | 53 |
53 class CC_EXPORT LayerTreeImpl { | 54 class CC_EXPORT LayerTreeImpl { |
54 public: | 55 public: |
55 static scoped_ptr<LayerTreeImpl> create( | 56 static scoped_ptr<LayerTreeImpl> create( |
56 LayerTreeHostImpl* layer_tree_host_impl) { | 57 LayerTreeHostImpl* layer_tree_host_impl) { |
57 return make_scoped_ptr(new LayerTreeImpl(layer_tree_host_impl)); | 58 return make_scoped_ptr(new LayerTreeImpl(layer_tree_host_impl)); |
58 } | 59 } |
59 virtual ~LayerTreeImpl(); | 60 virtual ~LayerTreeImpl(); |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 } | 253 } |
253 | 254 |
254 LayerImpl* FindFirstScrollingLayerThatIsHitByPoint( | 255 LayerImpl* FindFirstScrollingLayerThatIsHitByPoint( |
255 const gfx::PointF& screen_space_point); | 256 const gfx::PointF& screen_space_point); |
256 | 257 |
257 LayerImpl* FindLayerThatIsHitByPoint(const gfx::PointF& screen_space_point); | 258 LayerImpl* FindLayerThatIsHitByPoint(const gfx::PointF& screen_space_point); |
258 | 259 |
259 LayerImpl* FindLayerThatIsHitByPointInTouchHandlerRegion( | 260 LayerImpl* FindLayerThatIsHitByPointInTouchHandlerRegion( |
260 const gfx::PointF& screen_space_point); | 261 const gfx::PointF& screen_space_point); |
261 | 262 |
| 263 void RegisterSelection(int start_layer_id, |
| 264 const SelectionHandle& start_handle, |
| 265 int end_layer_id, |
| 266 const SelectionHandle& end_handle); |
| 267 void GetViewportSelection(SelectionHandle* start_handle, |
| 268 SelectionHandle* end_handle); |
| 269 |
262 protected: | 270 protected: |
263 explicit LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); | 271 explicit LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); |
264 void ReleaseResourcesRecursive(LayerImpl* current); | 272 void ReleaseResourcesRecursive(LayerImpl* current); |
| 273 void ClearSelection(); |
265 | 274 |
266 LayerTreeHostImpl* layer_tree_host_impl_; | 275 LayerTreeHostImpl* layer_tree_host_impl_; |
267 int source_frame_number_; | 276 int source_frame_number_; |
268 scoped_ptr<LayerImpl> root_layer_; | 277 scoped_ptr<LayerImpl> root_layer_; |
269 HeadsUpDisplayLayerImpl* hud_layer_; | 278 HeadsUpDisplayLayerImpl* hud_layer_; |
270 LayerImpl* currently_scrolling_layer_; | 279 LayerImpl* currently_scrolling_layer_; |
271 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; | 280 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; |
272 scoped_ptr<LayerScrollOffsetDelegateProxy> | 281 scoped_ptr<LayerScrollOffsetDelegateProxy> |
273 inner_viewport_scroll_delegate_proxy_; | 282 inner_viewport_scroll_delegate_proxy_; |
274 scoped_ptr<LayerScrollOffsetDelegateProxy> | 283 scoped_ptr<LayerScrollOffsetDelegateProxy> |
275 outer_viewport_scroll_delegate_proxy_; | 284 outer_viewport_scroll_delegate_proxy_; |
276 SkColor background_color_; | 285 SkColor background_color_; |
277 bool has_transparent_background_; | 286 bool has_transparent_background_; |
278 | 287 |
279 LayerImpl* page_scale_layer_; | 288 LayerImpl* page_scale_layer_; |
280 LayerImpl* inner_viewport_scroll_layer_; | 289 LayerImpl* inner_viewport_scroll_layer_; |
281 LayerImpl* outer_viewport_scroll_layer_; | 290 LayerImpl* outer_viewport_scroll_layer_; |
282 | 291 |
| 292 LayerImpl* start_selection_layer_; |
| 293 SelectionHandle start_selection_handle_; |
| 294 LayerImpl* end_selection_layer_; |
| 295 SelectionHandle end_selection_handle_; |
| 296 |
283 float page_scale_factor_; | 297 float page_scale_factor_; |
284 float page_scale_delta_; | 298 float page_scale_delta_; |
285 float sent_page_scale_delta_; | 299 float sent_page_scale_delta_; |
286 float min_page_scale_factor_; | 300 float min_page_scale_factor_; |
287 float max_page_scale_factor_; | 301 float max_page_scale_factor_; |
288 | 302 |
289 typedef base::hash_map<int, LayerImpl*> LayerIdMap; | 303 typedef base::hash_map<int, LayerImpl*> LayerIdMap; |
290 LayerIdMap layer_id_map_; | 304 LayerIdMap layer_id_map_; |
291 | 305 |
292 std::vector<LayerImpl*> layers_with_copy_output_request_; | 306 std::vector<LayerImpl*> layers_with_copy_output_request_; |
(...skipping 21 matching lines...) Expand all Loading... |
314 | 328 |
315 int render_surface_layer_list_id_; | 329 int render_surface_layer_list_id_; |
316 | 330 |
317 private: | 331 private: |
318 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 332 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
319 }; | 333 }; |
320 | 334 |
321 } // namespace cc | 335 } // namespace cc |
322 | 336 |
323 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 337 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
OLD | NEW |