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_THREAD_PROXY_H_ | 5 #ifndef CC_TREES_THREAD_PROXY_H_ |
6 #define CC_TREES_THREAD_PROXY_H_ | 6 #define CC_TREES_THREAD_PROXY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 bool ReduceContentsTextureMemoryOnImplThread(size_t limit_bytes, | 210 bool ReduceContentsTextureMemoryOnImplThread(size_t limit_bytes, |
211 int priority_cutoff) override; | 211 int priority_cutoff) override; |
212 bool IsInsideDraw() override; | 212 bool IsInsideDraw() override; |
213 void RenewTreePriority() override; | 213 void RenewTreePriority() override; |
214 void PostDelayedAnimationTaskOnImplThread(const base::Closure& task, | 214 void PostDelayedAnimationTaskOnImplThread(const base::Closure& task, |
215 base::TimeDelta delay) override; | 215 base::TimeDelta delay) override; |
216 void DidActivateSyncTree() override; | 216 void DidActivateSyncTree() override; |
217 void DidPrepareTiles() override; | 217 void DidPrepareTiles() override; |
218 void DidCompletePageScaleAnimationOnImplThread() override; | 218 void DidCompletePageScaleAnimationOnImplThread() override; |
219 void OnDrawForOutputSurface() override; | 219 void OnDrawForOutputSurface() override; |
| 220 // This should only be called by LayerTreeHostImpl::PostFrameTimingEvents. |
| 221 void PostFrameTimingEventsOnImplThread( |
| 222 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, |
| 223 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) |
| 224 override; |
220 | 225 |
221 // SchedulerClient implementation | 226 // SchedulerClient implementation |
222 void WillBeginImplFrame(const BeginFrameArgs& args) override; | 227 void WillBeginImplFrame(const BeginFrameArgs& args) override; |
223 void DidFinishImplFrame() override; | 228 void DidFinishImplFrame() override; |
224 void ScheduledActionSendBeginMainFrame() override; | 229 void ScheduledActionSendBeginMainFrame() override; |
225 DrawResult ScheduledActionDrawAndSwapIfPossible() override; | 230 DrawResult ScheduledActionDrawAndSwapIfPossible() override; |
226 DrawResult ScheduledActionDrawAndSwapForced() override; | 231 DrawResult ScheduledActionDrawAndSwapForced() override; |
227 void ScheduledActionAnimate() override; | 232 void ScheduledActionAnimate() override; |
228 void ScheduledActionCommit() override; | 233 void ScheduledActionCommit() override; |
229 void ScheduledActionActivateSyncTree() override; | 234 void ScheduledActionActivateSyncTree() override; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 void LayerTreeHostClosedOnImplThread(CompletionEvent* completion); | 290 void LayerTreeHostClosedOnImplThread(CompletionEvent* completion); |
286 DrawResult DrawSwapInternal(bool forced_draw); | 291 DrawResult DrawSwapInternal(bool forced_draw); |
287 void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion); | 292 void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion); |
288 void MainFrameWillHappenOnImplThreadForTesting(CompletionEvent* completion, | 293 void MainFrameWillHappenOnImplThreadForTesting(CompletionEvent* completion, |
289 bool* main_frame_will_happen); | 294 bool* main_frame_will_happen); |
290 void SetSwapUsedIncompleteTileOnImplThread(bool used_incomplete_tile); | 295 void SetSwapUsedIncompleteTileOnImplThread(bool used_incomplete_tile); |
291 void MainThreadHasStoppedFlingingOnImplThread(); | 296 void MainThreadHasStoppedFlingingOnImplThread(); |
292 void SetInputThrottledUntilCommitOnImplThread(bool is_throttled); | 297 void SetInputThrottledUntilCommitOnImplThread(bool is_throttled); |
293 void SetDebugStateOnImplThread(const LayerTreeDebugState& debug_state); | 298 void SetDebugStateOnImplThread(const LayerTreeDebugState& debug_state); |
294 void SetDeferCommitsOnImplThread(bool defer_commits) const; | 299 void SetDeferCommitsOnImplThread(bool defer_commits) const; |
| 300 void PostFrameTimingEvents( |
| 301 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, |
| 302 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events); |
295 | 303 |
296 LayerTreeHost* layer_tree_host(); | 304 LayerTreeHost* layer_tree_host(); |
297 const LayerTreeHost* layer_tree_host() const; | 305 const LayerTreeHost* layer_tree_host() const; |
298 | 306 |
299 // Use accessors instead of this variable directly. | 307 // Use accessors instead of this variable directly. |
300 MainThreadOnly main_thread_only_vars_unsafe_; | 308 MainThreadOnly main_thread_only_vars_unsafe_; |
301 MainThreadOnly& main(); | 309 MainThreadOnly& main(); |
302 | 310 |
303 // Use accessors instead of this variable directly. | 311 // Use accessors instead of this variable directly. |
304 MainThreadOrBlockedMainThread main_thread_or_blocked_vars_unsafe_; | 312 MainThreadOrBlockedMainThread main_thread_or_blocked_vars_unsafe_; |
305 MainThreadOrBlockedMainThread& blocked_main(); | 313 MainThreadOrBlockedMainThread& blocked_main(); |
306 | 314 |
307 // Use accessors instead of this variable directly. | 315 // Use accessors instead of this variable directly. |
308 CompositorThreadOnly compositor_thread_vars_unsafe_; | 316 CompositorThreadOnly compositor_thread_vars_unsafe_; |
309 CompositorThreadOnly& impl(); | 317 CompositorThreadOnly& impl(); |
310 | 318 |
311 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; | 319 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; |
312 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; | 320 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; |
313 | 321 |
314 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 322 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
315 }; | 323 }; |
316 | 324 |
317 } // namespace cc | 325 } // namespace cc |
318 | 326 |
319 #endif // CC_TREES_THREAD_PROXY_H_ | 327 #endif // CC_TREES_THREAD_PROXY_H_ |
OLD | NEW |