| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 base::hash_map<int, int> clip_scroll_map_; | 464 base::hash_map<int, int> clip_scroll_map_; |
| 459 | 465 |
| 460 // Maps scroll layer ids to scrollbar layer ids. For each scroll layer, there | 466 // Maps scroll layer ids to scrollbar layer ids. For each scroll layer, there |
| 461 // may be 1 or 2 scrollbar layers (for vertical and horizontal). (This is | 467 // may be 1 or 2 scrollbar layers (for vertical and horizontal). (This is |
| 462 // derived from ScrollbarLayerImplBase::scroll_layer_id_ and exists to avoid | 468 // derived from ScrollbarLayerImplBase::scroll_layer_id_ and exists to avoid |
| 463 // O(n) walks.) | 469 // O(n) walks.) |
| 464 std::multimap<int, int> scrollbar_map_; | 470 std::multimap<int, int> scrollbar_map_; |
| 465 | 471 |
| 466 std::vector<PictureLayerImpl*> picture_layers_; | 472 std::vector<PictureLayerImpl*> picture_layers_; |
| 467 std::vector<LayerImpl*> layers_with_copy_output_request_; | 473 std::vector<LayerImpl*> layers_with_copy_output_request_; |
| 474 std::vector<LayerImpl*> surface_layers_; |
| 468 | 475 |
| 469 // List of visible layers for the most recently prepared frame. | 476 // List of visible layers for the most recently prepared frame. |
| 470 LayerImplList render_surface_layer_list_; | 477 LayerImplList render_surface_layer_list_; |
| 471 // After drawing the |render_surface_layer_list_| the areas in this region | 478 // After drawing the |render_surface_layer_list_| the areas in this region |
| 472 // would not be fully covered by opaque content. | 479 // would not be fully covered by opaque content. |
| 473 Region unoccluded_screen_space_region_; | 480 Region unoccluded_screen_space_region_; |
| 474 | 481 |
| 475 bool viewport_size_invalid_; | 482 bool viewport_size_invalid_; |
| 476 bool needs_update_draw_properties_; | 483 bool needs_update_draw_properties_; |
| 477 | 484 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 502 | 509 |
| 503 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; | 510 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
| 504 | 511 |
| 505 private: | 512 private: |
| 506 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 513 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
| 507 }; | 514 }; |
| 508 | 515 |
| 509 } // namespace cc | 516 } // namespace cc |
| 510 | 517 |
| 511 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 518 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
| OLD | NEW |