OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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_HOST_IMPL_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "cc/input/input_handler.h" | 23 #include "cc/input/input_handler.h" |
24 #include "cc/input/layer_scroll_offset_delegate.h" | 24 #include "cc/input/layer_scroll_offset_delegate.h" |
25 #include "cc/input/top_controls_manager_client.h" | 25 #include "cc/input/top_controls_manager_client.h" |
26 #include "cc/layers/layer_lists.h" | 26 #include "cc/layers/layer_lists.h" |
27 #include "cc/layers/render_pass_sink.h" | 27 #include "cc/layers/render_pass_sink.h" |
28 #include "cc/output/begin_frame_args.h" | 28 #include "cc/output/begin_frame_args.h" |
29 #include "cc/output/managed_memory_policy.h" | 29 #include "cc/output/managed_memory_policy.h" |
30 #include "cc/output/output_surface_client.h" | 30 #include "cc/output/output_surface_client.h" |
31 #include "cc/output/renderer.h" | 31 #include "cc/output/renderer.h" |
32 #include "cc/quads/render_pass.h" | 32 #include "cc/quads/render_pass.h" |
| 33 #include "cc/resources/rasterizer.h" |
33 #include "cc/resources/resource_provider.h" | 34 #include "cc/resources/resource_provider.h" |
34 #include "cc/resources/tile_manager.h" | 35 #include "cc/resources/tile_manager.h" |
35 #include "cc/scheduler/commit_earlyout_reason.h" | 36 #include "cc/scheduler/commit_earlyout_reason.h" |
36 #include "cc/scheduler/draw_result.h" | 37 #include "cc/scheduler/draw_result.h" |
37 #include "skia/ext/refptr.h" | 38 #include "skia/ext/refptr.h" |
38 #include "third_party/skia/include/core/SkColor.h" | 39 #include "third_party/skia/include/core/SkColor.h" |
39 #include "ui/gfx/geometry/rect.h" | 40 #include "ui/gfx/geometry/rect.h" |
40 | 41 |
41 namespace cc { | 42 namespace cc { |
42 | 43 |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 void GetPictureLayerImplPairs(std::vector<PictureLayerImpl::Pair>* layers, | 494 void GetPictureLayerImplPairs(std::vector<PictureLayerImpl::Pair>* layers, |
494 bool need_valid_tile_priorities) const; | 495 bool need_valid_tile_priorities) const; |
495 | 496 |
496 void SetRequiresHighResToDraw() { requires_high_res_to_draw_ = true; } | 497 void SetRequiresHighResToDraw() { requires_high_res_to_draw_ = true; } |
497 void ResetRequiresHighResToDraw() { requires_high_res_to_draw_ = false; } | 498 void ResetRequiresHighResToDraw() { requires_high_res_to_draw_ = false; } |
498 bool RequiresHighResToDraw() const { return requires_high_res_to_draw_; } | 499 bool RequiresHighResToDraw() const { return requires_high_res_to_draw_; } |
499 | 500 |
500 // Only valid for synchronous (non-scheduled) single-threaded case. | 501 // Only valid for synchronous (non-scheduled) single-threaded case. |
501 void SynchronouslyInitializeAllTiles(); | 502 void SynchronouslyInitializeAllTiles(); |
502 | 503 |
| 504 virtual scoped_ptr<Rasterizer> CreateRasterizer(); |
503 virtual void CreateResourceAndTileTaskWorkerPool( | 505 virtual void CreateResourceAndTileTaskWorkerPool( |
504 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool, | 506 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool, |
505 scoped_ptr<ResourcePool>* resource_pool, | 507 scoped_ptr<ResourcePool>* resource_pool, |
506 scoped_ptr<ResourcePool>* staging_resource_pool); | 508 scoped_ptr<ResourcePool>* staging_resource_pool); |
507 | 509 |
508 protected: | 510 protected: |
509 LayerTreeHostImpl( | 511 LayerTreeHostImpl( |
510 const LayerTreeSettings& settings, | 512 const LayerTreeSettings& settings, |
511 LayerTreeHostImplClient* client, | 513 LayerTreeHostImplClient* client, |
512 Proxy* proxy, | 514 Proxy* proxy, |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 | 607 |
606 scoped_ptr<OutputSurface> output_surface_; | 608 scoped_ptr<OutputSurface> output_surface_; |
607 | 609 |
608 // |resource_provider_| and |tile_manager_| can be NULL, e.g. when using tile- | 610 // |resource_provider_| and |tile_manager_| can be NULL, e.g. when using tile- |
609 // free rendering - see OutputSurface::ForcedDrawToSoftwareDevice(). | 611 // free rendering - see OutputSurface::ForcedDrawToSoftwareDevice(). |
610 scoped_ptr<ResourceProvider> resource_provider_; | 612 scoped_ptr<ResourceProvider> resource_provider_; |
611 scoped_ptr<TileManager> tile_manager_; | 613 scoped_ptr<TileManager> tile_manager_; |
612 bool use_gpu_rasterization_; | 614 bool use_gpu_rasterization_; |
613 GpuRasterizationStatus gpu_rasterization_status_; | 615 GpuRasterizationStatus gpu_rasterization_status_; |
614 scoped_ptr<TileTaskWorkerPool> tile_task_worker_pool_; | 616 scoped_ptr<TileTaskWorkerPool> tile_task_worker_pool_; |
| 617 scoped_ptr<Rasterizer> rasterizer_; |
615 scoped_ptr<ResourcePool> resource_pool_; | 618 scoped_ptr<ResourcePool> resource_pool_; |
616 scoped_ptr<ResourcePool> staging_resource_pool_; | 619 scoped_ptr<ResourcePool> staging_resource_pool_; |
617 scoped_ptr<Renderer> renderer_; | 620 scoped_ptr<Renderer> renderer_; |
618 | 621 |
619 GlobalStateThatImpactsTilePriority global_tile_state_; | 622 GlobalStateThatImpactsTilePriority global_tile_state_; |
620 | 623 |
621 // Tree currently being drawn. | 624 // Tree currently being drawn. |
622 scoped_ptr<LayerTreeImpl> active_tree_; | 625 scoped_ptr<LayerTreeImpl> active_tree_; |
623 | 626 |
624 // In impl-side painting mode, tree with possibly incomplete rasterized | 627 // In impl-side painting mode, tree with possibly incomplete rasterized |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 | 730 |
728 bool requires_high_res_to_draw_; | 731 bool requires_high_res_to_draw_; |
729 bool required_for_draw_tile_is_top_of_raster_queue_; | 732 bool required_for_draw_tile_is_top_of_raster_queue_; |
730 | 733 |
731 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 734 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
732 }; | 735 }; |
733 | 736 |
734 } // namespace cc | 737 } // namespace cc |
735 | 738 |
736 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 739 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |