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 <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 void UnregisterScrollbar(ScrollbarLayerImplBase* scrollbar_layer); | 327 void UnregisterScrollbar(ScrollbarLayerImplBase* scrollbar_layer); |
328 ScrollbarSet ScrollbarsFor(int scroll_layer_id) const; | 328 ScrollbarSet ScrollbarsFor(int scroll_layer_id) const; |
329 | 329 |
330 void RegisterScrollLayer(LayerImpl* layer); | 330 void RegisterScrollLayer(LayerImpl* layer); |
331 void UnregisterScrollLayer(LayerImpl* layer); | 331 void UnregisterScrollLayer(LayerImpl* layer); |
332 | 332 |
333 void AddLayerWithCopyOutputRequest(LayerImpl* layer); | 333 void AddLayerWithCopyOutputRequest(LayerImpl* layer); |
334 void RemoveLayerWithCopyOutputRequest(LayerImpl* layer); | 334 void RemoveLayerWithCopyOutputRequest(LayerImpl* layer); |
335 const std::vector<LayerImpl*>& LayersWithCopyOutputRequest() const; | 335 const std::vector<LayerImpl*>& LayersWithCopyOutputRequest() const; |
336 | 336 |
| 337 void AddSurfaceLayer(LayerImpl* layer); |
| 338 void RemoveSurfaceLayer(LayerImpl* layer); |
| 339 const std::vector<LayerImpl*>& SurfaceLayers() const { |
| 340 return surface_layers_; |
| 341 } |
| 342 |
337 int current_render_surface_list_id() const { | 343 int current_render_surface_list_id() const { |
338 return render_surface_layer_list_id_; | 344 return render_surface_layer_list_id_; |
339 } | 345 } |
340 | 346 |
341 LayerImpl* FindFirstScrollingLayerThatIsHitByPoint( | 347 LayerImpl* FindFirstScrollingLayerThatIsHitByPoint( |
342 const gfx::PointF& screen_space_point); | 348 const gfx::PointF& screen_space_point); |
343 | 349 |
344 LayerImpl* FindLayerThatIsHitByPoint(const gfx::PointF& screen_space_point); | 350 LayerImpl* FindLayerThatIsHitByPoint(const gfx::PointF& screen_space_point); |
345 | 351 |
346 LayerImpl* FindLayerWithWheelHandlerThatIsHitByPoint( | 352 LayerImpl* FindLayerWithWheelHandlerThatIsHitByPoint( |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 base::hash_map<int, int> clip_scroll_map_; | 463 base::hash_map<int, int> clip_scroll_map_; |
458 | 464 |
459 // Maps scroll layer ids to scrollbar layer ids. For each scroll layer, there | 465 // Maps scroll layer ids to scrollbar layer ids. For each scroll layer, there |
460 // may be 1 or 2 scrollbar layers (for vertical and horizontal). (This is | 466 // may be 1 or 2 scrollbar layers (for vertical and horizontal). (This is |
461 // derived from ScrollbarLayerImplBase::scroll_layer_id_ and exists to avoid | 467 // derived from ScrollbarLayerImplBase::scroll_layer_id_ and exists to avoid |
462 // O(n) walks.) | 468 // O(n) walks.) |
463 std::multimap<int, int> scrollbar_map_; | 469 std::multimap<int, int> scrollbar_map_; |
464 | 470 |
465 std::vector<PictureLayerImpl*> picture_layers_; | 471 std::vector<PictureLayerImpl*> picture_layers_; |
466 std::vector<LayerImpl*> layers_with_copy_output_request_; | 472 std::vector<LayerImpl*> layers_with_copy_output_request_; |
| 473 std::vector<LayerImpl*> surface_layers_; |
467 | 474 |
468 // List of visible layers for the most recently prepared frame. | 475 // List of visible layers for the most recently prepared frame. |
469 LayerImplList render_surface_layer_list_; | 476 LayerImplList render_surface_layer_list_; |
470 // After drawing the |render_surface_layer_list_| the areas in this region | 477 // After drawing the |render_surface_layer_list_| the areas in this region |
471 // would not be fully covered by opaque content. | 478 // would not be fully covered by opaque content. |
472 Region unoccluded_screen_space_region_; | 479 Region unoccluded_screen_space_region_; |
473 | 480 |
474 bool viewport_size_invalid_; | 481 bool viewport_size_invalid_; |
475 bool needs_update_draw_properties_; | 482 bool needs_update_draw_properties_; |
476 | 483 |
(...skipping 24 matching lines...) Expand all Loading... |
501 | 508 |
502 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; | 509 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
503 | 510 |
504 private: | 511 private: |
505 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 512 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
506 }; | 513 }; |
507 | 514 |
508 } // namespace cc | 515 } // namespace cc |
509 | 516 |
510 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 517 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
OLD | NEW |