| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 // Returns true if resources were deleted by this call. | 100 // Returns true if resources were deleted by this call. |
| 101 virtual bool ReduceContentsTextureMemoryOnImplThread( | 101 virtual bool ReduceContentsTextureMemoryOnImplThread( |
| 102 size_t limit_bytes, | 102 size_t limit_bytes, |
| 103 int priority_cutoff) = 0; | 103 int priority_cutoff) = 0; |
| 104 virtual bool IsInsideDraw() = 0; | 104 virtual bool IsInsideDraw() = 0; |
| 105 virtual void RenewTreePriority() = 0; | 105 virtual void RenewTreePriority() = 0; |
| 106 virtual void PostDelayedAnimationTaskOnImplThread(const base::Closure& task, | 106 virtual void PostDelayedAnimationTaskOnImplThread(const base::Closure& task, |
| 107 base::TimeDelta delay) = 0; | 107 base::TimeDelta delay) = 0; |
| 108 virtual void DidActivateSyncTree() = 0; | 108 virtual void DidActivateSyncTree() = 0; |
| 109 virtual void DidPrepareTiles() = 0; | 109 virtual void DidPrepareTiles() = 0; |
| 110 virtual base::TimeTicks GetNextBeginImplFrameTimeIfRequested() const = 0; |
| 110 | 111 |
| 111 // Called when page scale animation has completed on the impl thread. | 112 // Called when page scale animation has completed on the impl thread. |
| 112 virtual void DidCompletePageScaleAnimationOnImplThread() = 0; | 113 virtual void DidCompletePageScaleAnimationOnImplThread() = 0; |
| 113 | 114 |
| 114 protected: | 115 protected: |
| 115 virtual ~LayerTreeHostImplClient() {} | 116 virtual ~LayerTreeHostImplClient() {} |
| 116 }; | 117 }; |
| 117 | 118 |
| 118 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering | 119 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering |
| 119 // state. | 120 // state. |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool, | 516 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool, |
| 516 scoped_ptr<ResourcePool>* resource_pool, | 517 scoped_ptr<ResourcePool>* resource_pool, |
| 517 scoped_ptr<ResourcePool>* staging_resource_pool); | 518 scoped_ptr<ResourcePool>* staging_resource_pool); |
| 518 | 519 |
| 519 bool prepare_tiles_needed() const { return tile_priorities_dirty_; } | 520 bool prepare_tiles_needed() const { return tile_priorities_dirty_; } |
| 520 | 521 |
| 521 FrameTimingTracker* frame_timing_tracker() { | 522 FrameTimingTracker* frame_timing_tracker() { |
| 522 return frame_timing_tracker_.get(); | 523 return frame_timing_tracker_.get(); |
| 523 } | 524 } |
| 524 | 525 |
| 526 void SetBeginMainFrameTime(base::TimeTicks frame_time); |
| 527 void RecordMainFrameTiming(); |
| 528 |
| 525 protected: | 529 protected: |
| 526 LayerTreeHostImpl( | 530 LayerTreeHostImpl( |
| 527 const LayerTreeSettings& settings, | 531 const LayerTreeSettings& settings, |
| 528 LayerTreeHostImplClient* client, | 532 LayerTreeHostImplClient* client, |
| 529 Proxy* proxy, | 533 Proxy* proxy, |
| 530 RenderingStatsInstrumentation* rendering_stats_instrumentation, | 534 RenderingStatsInstrumentation* rendering_stats_instrumentation, |
| 531 SharedBitmapManager* shared_bitmap_manager, | 535 SharedBitmapManager* shared_bitmap_manager, |
| 532 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 536 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
| 533 int id); | 537 int id); |
| 534 | 538 |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; | 729 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; |
| 726 int id_; | 730 int id_; |
| 727 | 731 |
| 728 std::set<SwapPromiseMonitor*> swap_promise_monitor_; | 732 std::set<SwapPromiseMonitor*> swap_promise_monitor_; |
| 729 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_; | 733 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_; |
| 730 | 734 |
| 731 bool requires_high_res_to_draw_; | 735 bool requires_high_res_to_draw_; |
| 732 bool is_likely_to_require_a_draw_; | 736 bool is_likely_to_require_a_draw_; |
| 733 | 737 |
| 734 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; | 738 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; |
| 739 base::TimeTicks main_frame_time_; |
| 735 | 740 |
| 736 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 741 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 737 }; | 742 }; |
| 738 | 743 |
| 739 } // namespace cc | 744 } // namespace cc |
| 740 | 745 |
| 741 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 746 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |