Chromium Code Reviews| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 104 // Returns true if resources were deleted by this call. | 104 // Returns true if resources were deleted by this call. |
| 105 virtual bool ReduceContentsTextureMemoryOnImplThread( | 105 virtual bool ReduceContentsTextureMemoryOnImplThread( |
| 106 size_t limit_bytes, | 106 size_t limit_bytes, |
| 107 int priority_cutoff) = 0; | 107 int priority_cutoff) = 0; |
| 108 virtual bool IsInsideDraw() = 0; | 108 virtual bool IsInsideDraw() = 0; |
| 109 virtual void RenewTreePriority() = 0; | 109 virtual void RenewTreePriority() = 0; |
| 110 virtual void PostDelayedAnimationTaskOnImplThread(const base::Closure& task, | 110 virtual void PostDelayedAnimationTaskOnImplThread(const base::Closure& task, |
| 111 base::TimeDelta delay) = 0; | 111 base::TimeDelta delay) = 0; |
| 112 virtual void DidActivateSyncTree() = 0; | 112 virtual void DidActivateSyncTree() = 0; |
| 113 virtual void DidPrepareTiles() = 0; | 113 virtual void DidPrepareTiles() = 0; |
| 114 virtual base::TimeTicks GetNextPredictedRequestAnimationFrameTime() const = 0; | |
| 114 | 115 |
| 115 // Called when page scale animation has completed on the impl thread. | 116 // Called when page scale animation has completed on the impl thread. |
| 116 virtual void DidCompletePageScaleAnimationOnImplThread() = 0; | 117 virtual void DidCompletePageScaleAnimationOnImplThread() = 0; |
| 117 | 118 |
| 118 protected: | 119 protected: |
| 119 virtual ~LayerTreeHostImplClient() {} | 120 virtual ~LayerTreeHostImplClient() {} |
| 120 }; | 121 }; |
| 121 | 122 |
| 122 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering | 123 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering |
| 123 // state. | 124 // state. |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 511 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool, | 512 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool, |
| 512 scoped_ptr<ResourcePool>* resource_pool, | 513 scoped_ptr<ResourcePool>* resource_pool, |
| 513 scoped_ptr<ResourcePool>* staging_resource_pool); | 514 scoped_ptr<ResourcePool>* staging_resource_pool); |
| 514 | 515 |
| 515 bool prepare_tiles_needed() const { return tile_priorities_dirty_; } | 516 bool prepare_tiles_needed() const { return tile_priorities_dirty_; } |
| 516 | 517 |
| 517 FrameTimingTracker* frame_timing_tracker() { | 518 FrameTimingTracker* frame_timing_tracker() { |
| 518 return frame_timing_tracker_.get(); | 519 return frame_timing_tracker_.get(); |
| 519 } | 520 } |
| 520 | 521 |
| 522 void SetCurrentRequestAnimationFrameTime(base::TimeTicks frame_time); | |
| 523 void RecordMainFrameTiming(); | |
|
mithro-old
2015/03/20 02:17:54
This method should definitely be taking a BeginFra
vmpstr
2015/03/20 18:47:26
Ok, I will work on passing BeginFrameArgs here ins
| |
| 524 | |
| 521 protected: | 525 protected: |
| 522 LayerTreeHostImpl( | 526 LayerTreeHostImpl( |
| 523 const LayerTreeSettings& settings, | 527 const LayerTreeSettings& settings, |
| 524 LayerTreeHostImplClient* client, | 528 LayerTreeHostImplClient* client, |
| 525 Proxy* proxy, | 529 Proxy* proxy, |
| 526 RenderingStatsInstrumentation* rendering_stats_instrumentation, | 530 RenderingStatsInstrumentation* rendering_stats_instrumentation, |
| 527 SharedBitmapManager* shared_bitmap_manager, | 531 SharedBitmapManager* shared_bitmap_manager, |
| 528 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 532 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
| 529 int id); | 533 int id); |
| 530 | 534 |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 728 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; | 732 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; |
| 729 int id_; | 733 int id_; |
| 730 | 734 |
| 731 std::set<SwapPromiseMonitor*> swap_promise_monitor_; | 735 std::set<SwapPromiseMonitor*> swap_promise_monitor_; |
| 732 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_; | 736 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_; |
| 733 | 737 |
| 734 bool requires_high_res_to_draw_; | 738 bool requires_high_res_to_draw_; |
| 735 bool is_likely_to_require_a_draw_; | 739 bool is_likely_to_require_a_draw_; |
| 736 | 740 |
| 737 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; | 741 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; |
| 742 base::TimeTicks request_animation_frame_time_; | |
| 738 | 743 |
| 739 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 744 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 740 }; | 745 }; |
| 741 | 746 |
| 742 } // namespace cc | 747 } // namespace cc |
| 743 | 748 |
| 744 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 749 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |