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_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_H_ |
6 #define CC_TREES_LAYER_TREE_HOST_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_H_ |
7 | 7 |
8 #include <limits> | 8 #include <limits> |
9 #include <list> | 9 #include <list> |
10 #include <set> | 10 #include <set> |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 return input_handler_weak_ptr_; | 139 return input_handler_weak_ptr_; |
140 } | 140 } |
141 | 141 |
142 void NotifyInputThrottledUntilCommit(); | 142 void NotifyInputThrottledUntilCommit(); |
143 | 143 |
144 void Composite(base::TimeTicks frame_begin_time); | 144 void Composite(base::TimeTicks frame_begin_time); |
145 | 145 |
146 // Composites and attempts to read back the result into the provided | 146 // Composites and attempts to read back the result into the provided |
147 // buffer. If it wasn't possible, e.g. due to context lost, will return | 147 // buffer. If it wasn't possible, e.g. due to context lost, will return |
148 // false. | 148 // false. |
149 bool CompositeAndReadback(void* pixels, gfx::Rect rect_in_device_viewport); | 149 bool CompositeAndReadback(void* pixels, |
| 150 const gfx::Rect& rect_in_device_viewport); |
150 | 151 |
151 void FinishAllRendering(); | 152 void FinishAllRendering(); |
152 | 153 |
153 void SetDeferCommits(bool defer_commits); | 154 void SetDeferCommits(bool defer_commits); |
154 | 155 |
155 // Test only hook | 156 // Test only hook |
156 virtual void DidDeferCommit(); | 157 virtual void DidDeferCommit(); |
157 | 158 |
158 int source_frame_number() const { return source_frame_number_; } | 159 int source_frame_number() const { return source_frame_number_; } |
159 | 160 |
160 void SetNeedsDisplayOnAllLayers(); | 161 void SetNeedsDisplayOnAllLayers(); |
161 | 162 |
162 void CollectRenderingStats(RenderingStats* stats) const; | 163 void CollectRenderingStats(RenderingStats* stats) const; |
163 | 164 |
164 RenderingStatsInstrumentation* rendering_stats_instrumentation() const { | 165 RenderingStatsInstrumentation* rendering_stats_instrumentation() const { |
165 return rendering_stats_instrumentation_.get(); | 166 return rendering_stats_instrumentation_.get(); |
166 } | 167 } |
167 | 168 |
168 const RendererCapabilities& GetRendererCapabilities() const; | 169 const RendererCapabilities& GetRendererCapabilities() const; |
169 | 170 |
170 void SetNeedsAnimate(); | 171 void SetNeedsAnimate(); |
171 virtual void SetNeedsUpdateLayers(); | 172 virtual void SetNeedsUpdateLayers(); |
172 virtual void SetNeedsCommit(); | 173 virtual void SetNeedsCommit(); |
173 virtual void SetNeedsFullTreeSync(); | 174 virtual void SetNeedsFullTreeSync(); |
174 void SetNeedsRedraw(); | 175 void SetNeedsRedraw(); |
175 void SetNeedsRedrawRect(gfx::Rect damage_rect); | 176 void SetNeedsRedrawRect(const gfx::Rect& damage_rect); |
176 bool CommitRequested() const; | 177 bool CommitRequested() const; |
177 bool BeginMainFrameRequested() const; | 178 bool BeginMainFrameRequested() const; |
178 | 179 |
179 void SetNextCommitWaitsForActivation(); | 180 void SetNextCommitWaitsForActivation(); |
180 | 181 |
181 void SetNextCommitForcesRedraw(); | 182 void SetNextCommitForcesRedraw(); |
182 | 183 |
183 void SetAnimationEvents(scoped_ptr<AnimationEventsVector> events, | 184 void SetAnimationEvents(scoped_ptr<AnimationEventsVector> events, |
184 base::Time wall_clock_time); | 185 base::Time wall_clock_time); |
185 | 186 |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 | 449 |
449 ScopedPtrVector<SwapPromise> swap_promise_list_; | 450 ScopedPtrVector<SwapPromise> swap_promise_list_; |
450 std::set<SwapPromiseMonitor*> swap_promise_monitor_; | 451 std::set<SwapPromiseMonitor*> swap_promise_monitor_; |
451 | 452 |
452 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 453 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
453 }; | 454 }; |
454 | 455 |
455 } // namespace cc | 456 } // namespace cc |
456 | 457 |
457 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 458 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
OLD | NEW |