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