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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 virtual void ForceSerializeOnSwapBuffers() OVERRIDE; | 58 virtual void ForceSerializeOnSwapBuffers() OVERRIDE; |
59 virtual skia::RefPtr<SkPicture> CapturePicture() OVERRIDE; | 59 virtual skia::RefPtr<SkPicture> CapturePicture() OVERRIDE; |
60 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE; | 60 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE; |
61 virtual bool CommitPendingForTesting() OVERRIDE; | 61 virtual bool CommitPendingForTesting() OVERRIDE; |
62 | 62 |
63 // LayerTreeHostImplClient implementation | 63 // LayerTreeHostImplClient implementation |
64 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE; | 64 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE; |
65 virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE; | 65 virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE; |
66 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, | 66 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, |
67 base::TimeDelta interval) OVERRIDE; | 67 base::TimeDelta interval) OVERRIDE; |
68 virtual void DidVSync(base::TimeTicks frame_time) OVERRIDE; | 68 virtual void DidBeginFrame(base::TimeTicks frame_time) OVERRIDE; |
69 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE; | 69 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE; |
70 virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) OVERRIDE; | 70 virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) OVERRIDE; |
71 virtual void SetNeedsRedrawOnImplThread() OVERRIDE; | 71 virtual void SetNeedsRedrawOnImplThread() OVERRIDE; |
72 virtual void SetNeedsRedrawRectOnImplThread(gfx::Rect dirty_rect) OVERRIDE; | 72 virtual void SetNeedsRedrawRectOnImplThread(gfx::Rect dirty_rect) OVERRIDE; |
73 virtual void DidInitializeVisibleTileOnImplThread() OVERRIDE; | 73 virtual void DidInitializeVisibleTileOnImplThread() OVERRIDE; |
74 virtual void SetNeedsCommitOnImplThread() OVERRIDE; | 74 virtual void SetNeedsCommitOnImplThread() OVERRIDE; |
75 virtual void SetNeedsManageTilesOnImplThread() OVERRIDE; | 75 virtual void SetNeedsManageTilesOnImplThread() OVERRIDE; |
76 virtual void PostAnimationEventsToMainThreadOnImplThread( | 76 virtual void PostAnimationEventsToMainThreadOnImplThread( |
77 scoped_ptr<AnimationEventsVector> queue, | 77 scoped_ptr<AnimationEventsVector> queue, |
78 base::Time wall_clock_time) OVERRIDE; | 78 base::Time wall_clock_time) OVERRIDE; |
79 virtual bool ReduceContentsTextureMemoryOnImplThread(size_t limit_bytes, | 79 virtual bool ReduceContentsTextureMemoryOnImplThread(size_t limit_bytes, |
80 int priority_cutoff) | 80 int priority_cutoff) |
81 OVERRIDE; | 81 OVERRIDE; |
82 virtual void ReduceWastedContentsTextureMemoryOnImplThread() OVERRIDE; | 82 virtual void ReduceWastedContentsTextureMemoryOnImplThread() OVERRIDE; |
83 virtual void SendManagedMemoryStats() OVERRIDE; | 83 virtual void SendManagedMemoryStats() OVERRIDE; |
84 virtual bool IsInsideDraw() OVERRIDE; | 84 virtual bool IsInsideDraw() OVERRIDE; |
85 virtual void RenewTreePriority() OVERRIDE; | 85 virtual void RenewTreePriority() OVERRIDE; |
86 virtual void RequestScrollbarAnimationOnImplThread(base::TimeDelta delay) | 86 virtual void RequestScrollbarAnimationOnImplThread(base::TimeDelta delay) |
87 OVERRIDE; | 87 OVERRIDE; |
88 virtual void DidReceiveLastInputEventForVSync( | 88 virtual void DidReceiveLastInputEventForBeginFrame( |
89 base::TimeTicks frame_time) OVERRIDE; | 89 base::TimeTicks frame_time) OVERRIDE; |
90 virtual void DidActivatePendingTree() OVERRIDE; | 90 virtual void DidActivatePendingTree() OVERRIDE; |
91 | 91 |
92 // SchedulerClient implementation | 92 // SchedulerClient implementation |
93 virtual void ScheduledActionBeginFrame() OVERRIDE; | 93 virtual void ScheduledActionBeginFrame() OVERRIDE; |
94 virtual ScheduledActionDrawAndSwapResult | 94 virtual ScheduledActionDrawAndSwapResult |
95 ScheduledActionDrawAndSwapIfPossible() OVERRIDE; | 95 ScheduledActionDrawAndSwapIfPossible() OVERRIDE; |
96 virtual ScheduledActionDrawAndSwapResult ScheduledActionDrawAndSwapForced() | 96 virtual ScheduledActionDrawAndSwapResult ScheduledActionDrawAndSwapForced() |
97 OVERRIDE; | 97 OVERRIDE; |
98 virtual void ScheduledActionCommit() OVERRIDE; | 98 virtual void ScheduledActionCommit() OVERRIDE; |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 // Set when the main thread is waiting on layers to be drawn. | 242 // Set when the main thread is waiting on layers to be drawn. |
243 CompletionEvent* texture_acquisition_completion_event_on_impl_thread_; | 243 CompletionEvent* texture_acquisition_completion_event_on_impl_thread_; |
244 | 244 |
245 scoped_ptr<ResourceUpdateController> | 245 scoped_ptr<ResourceUpdateController> |
246 current_resource_update_controller_on_impl_thread_; | 246 current_resource_update_controller_on_impl_thread_; |
247 | 247 |
248 // Set when the next draw should post DidCommitAndDrawFrame to the main | 248 // Set when the next draw should post DidCommitAndDrawFrame to the main |
249 // thread. | 249 // thread. |
250 bool next_frame_is_newly_committed_frame_on_impl_thread_; | 250 bool next_frame_is_newly_committed_frame_on_impl_thread_; |
251 | 251 |
252 bool render_vsync_enabled_; | 252 bool throttle_frame_production_; |
253 bool render_vsync_notification_enabled_; | 253 bool render_begin_frame_notification_enabled_; |
254 bool synchronously_disable_vsync_; | 254 bool using_synchronous_renderer_compositor_; |
255 VSyncClient* vsync_client_; | 255 VSyncClient* vsync_client_; |
256 | 256 |
257 bool inside_draw_; | 257 bool inside_draw_; |
258 | 258 |
259 bool defer_commits_; | 259 bool defer_commits_; |
260 scoped_ptr<BeginFrameAndCommitState> pending_deferred_commit_; | 260 scoped_ptr<BeginFrameAndCommitState> pending_deferred_commit_; |
261 | 261 |
262 base::TimeTicks smoothness_takes_priority_expiration_time_; | 262 base::TimeTicks smoothness_takes_priority_expiration_time_; |
263 bool renew_tree_priority_on_impl_thread_pending_; | 263 bool renew_tree_priority_on_impl_thread_pending_; |
264 | 264 |
265 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 265 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
266 }; | 266 }; |
267 | 267 |
268 } // namespace cc | 268 } // namespace cc |
269 | 269 |
270 #endif // CC_TREES_THREAD_PROXY_H_ | 270 #endif // CC_TREES_THREAD_PROXY_H_ |
OLD | NEW |