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 <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; | 355 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; |
356 void SetTreeActivationCallback(const base::Closure& callback) override; | 356 void SetTreeActivationCallback(const base::Closure& callback) override; |
357 void OnDraw() override; | 357 void OnDraw() override; |
358 | 358 |
359 // Called from LayerTreeImpl. | 359 // Called from LayerTreeImpl. |
360 void OnCanDrawStateChangedForTree(); | 360 void OnCanDrawStateChangedForTree(); |
361 | 361 |
362 // Implementation. | 362 // Implementation. |
363 int id() const { return id_; } | 363 int id() const { return id_; } |
364 bool CanDraw() const; | 364 bool CanDraw() const; |
365 OutputSurface* output_surface() const { return output_surface_; } | 365 OutputSurface* output_surface() const { return output_surface_.get(); } |
366 | 366 |
367 std::string LayerTreeAsJson() const; | 367 std::string LayerTreeAsJson() const; |
368 | 368 |
369 void FinishAllRendering(); | 369 void FinishAllRendering(); |
370 int RequestedMSAASampleCount() const; | 370 int RequestedMSAASampleCount() const; |
371 | 371 |
372 virtual bool InitializeRenderer(OutputSurface* output_surface); | 372 virtual bool InitializeRenderer(scoped_ptr<OutputSurface> output_surface); |
373 TileManager* tile_manager() { return tile_manager_.get(); } | 373 TileManager* tile_manager() { return tile_manager_.get(); } |
374 | 374 |
375 void SetHasGpuRasterizationTrigger(bool flag) { | 375 void SetHasGpuRasterizationTrigger(bool flag) { |
376 has_gpu_rasterization_trigger_ = flag; | 376 has_gpu_rasterization_trigger_ = flag; |
377 UpdateGpuRasterizationStatus(); | 377 UpdateGpuRasterizationStatus(); |
378 } | 378 } |
379 void SetContentIsSuitableForGpuRasterization(bool flag) { | 379 void SetContentIsSuitableForGpuRasterization(bool flag) { |
380 content_is_suitable_for_gpu_rasterization_ = flag; | 380 content_is_suitable_for_gpu_rasterization_ = flag; |
381 UpdateGpuRasterizationStatus(); | 381 UpdateGpuRasterizationStatus(); |
382 } | 382 } |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 | 689 |
690 typedef base::hash_map<UIResourceId, UIResourceData> | 690 typedef base::hash_map<UIResourceId, UIResourceData> |
691 UIResourceMap; | 691 UIResourceMap; |
692 UIResourceMap ui_resource_map_; | 692 UIResourceMap ui_resource_map_; |
693 | 693 |
694 // Resources that were evicted by EvictAllUIResources. Resources are removed | 694 // Resources that were evicted by EvictAllUIResources. Resources are removed |
695 // from this when they are touched by a create or destroy from the UI resource | 695 // from this when they are touched by a create or destroy from the UI resource |
696 // request queue. | 696 // request queue. |
697 std::set<UIResourceId> evicted_ui_resources_; | 697 std::set<UIResourceId> evicted_ui_resources_; |
698 | 698 |
699 OutputSurface* output_surface_; | 699 scoped_ptr<OutputSurface> output_surface_; |
700 | 700 |
701 scoped_ptr<ResourceProvider> resource_provider_; | 701 scoped_ptr<ResourceProvider> resource_provider_; |
702 bool content_is_suitable_for_gpu_rasterization_; | 702 bool content_is_suitable_for_gpu_rasterization_; |
703 bool has_gpu_rasterization_trigger_; | 703 bool has_gpu_rasterization_trigger_; |
704 bool use_gpu_rasterization_; | 704 bool use_gpu_rasterization_; |
705 bool use_msaa_; | 705 bool use_msaa_; |
706 GpuRasterizationStatus gpu_rasterization_status_; | 706 GpuRasterizationStatus gpu_rasterization_status_; |
707 bool tree_resources_for_gpu_rasterization_dirty_; | 707 bool tree_resources_for_gpu_rasterization_dirty_; |
708 scoped_ptr<TileTaskWorkerPool> tile_task_worker_pool_; | 708 scoped_ptr<TileTaskWorkerPool> tile_task_worker_pool_; |
709 scoped_ptr<ResourcePool> resource_pool_; | 709 scoped_ptr<ResourcePool> resource_pool_; |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
816 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; | 816 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; |
817 | 817 |
818 scoped_ptr<Viewport> viewport_; | 818 scoped_ptr<Viewport> viewport_; |
819 | 819 |
820 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 820 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
821 }; | 821 }; |
822 | 822 |
823 } // namespace cc | 823 } // namespace cc |
824 | 824 |
825 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 825 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |