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_SINGLE_THREAD_PROXY_H_ | 5 #ifndef CC_TREES_SINGLE_THREAD_PROXY_H_ |
6 #define CC_TREES_SINGLE_THREAD_PROXY_H_ | 6 #define CC_TREES_SINGLE_THREAD_PROXY_H_ |
7 | 7 |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/cancelable_callback.h" | 10 #include "base/cancelable_callback.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 LayerTreeHostSingleThreadClient* client, | 34 LayerTreeHostSingleThreadClient* client, |
35 TaskRunnerProvider* task_runner_provider_); | 35 TaskRunnerProvider* task_runner_provider_); |
36 ~SingleThreadProxy() override; | 36 ~SingleThreadProxy() override; |
37 | 37 |
38 // Proxy implementation | 38 // Proxy implementation |
39 bool IsStarted() const override; | 39 bool IsStarted() const override; |
40 bool CommitToActiveTree() const override; | 40 bool CommitToActiveTree() const override; |
41 void SetOutputSurface(OutputSurface* output_surface) override; | 41 void SetOutputSurface(OutputSurface* output_surface) override; |
42 void ReleaseOutputSurface() override; | 42 void ReleaseOutputSurface() override; |
43 void SetVisible(bool visible) override; | 43 void SetVisible(bool visible) override; |
44 const RendererCapabilities& GetRendererCapabilities() const override; | |
45 void SetNeedsAnimate() override; | 44 void SetNeedsAnimate() override; |
46 void SetNeedsUpdateLayers() override; | 45 void SetNeedsUpdateLayers() override; |
47 void SetNeedsCommit() override; | 46 void SetNeedsCommit() override; |
48 void SetNeedsRedraw(const gfx::Rect& damage_rect) override; | 47 void SetNeedsRedraw(const gfx::Rect& damage_rect) override; |
49 void SetNextCommitWaitsForActivation() override; | 48 void SetNextCommitWaitsForActivation() override; |
50 void NotifyInputThrottledUntilCommit() override {} | 49 void NotifyInputThrottledUntilCommit() override {} |
51 void SetDeferCommits(bool defer_commits) override; | 50 void SetDeferCommits(bool defer_commits) override; |
52 bool CommitRequested() const override; | 51 bool CommitRequested() const override; |
53 bool BeginMainFrameRequested() const override; | 52 bool BeginMainFrameRequested() const override; |
54 void MainThreadHasStoppedFlinging() override {} | 53 void MainThreadHasStoppedFlinging() override {} |
(...skipping 14 matching lines...) Expand all Loading... |
69 DrawResult ScheduledActionDrawAndSwapIfPossible() override; | 68 DrawResult ScheduledActionDrawAndSwapIfPossible() override; |
70 DrawResult ScheduledActionDrawAndSwapForced() override; | 69 DrawResult ScheduledActionDrawAndSwapForced() override; |
71 void ScheduledActionCommit() override; | 70 void ScheduledActionCommit() override; |
72 void ScheduledActionActivateSyncTree() override; | 71 void ScheduledActionActivateSyncTree() override; |
73 void ScheduledActionBeginOutputSurfaceCreation() override; | 72 void ScheduledActionBeginOutputSurfaceCreation() override; |
74 void ScheduledActionPrepareTiles() override; | 73 void ScheduledActionPrepareTiles() override; |
75 void ScheduledActionInvalidateOutputSurface() override; | 74 void ScheduledActionInvalidateOutputSurface() override; |
76 void SendBeginMainFrameNotExpectedSoon() override; | 75 void SendBeginMainFrameNotExpectedSoon() override; |
77 | 76 |
78 // LayerTreeHostImplClient implementation | 77 // LayerTreeHostImplClient implementation |
79 void UpdateRendererCapabilitiesOnImplThread() override; | |
80 void DidLoseOutputSurfaceOnImplThread() override; | 78 void DidLoseOutputSurfaceOnImplThread() override; |
81 void CommitVSyncParameters(base::TimeTicks timebase, | 79 void CommitVSyncParameters(base::TimeTicks timebase, |
82 base::TimeDelta interval) override; | 80 base::TimeDelta interval) override; |
83 void SetBeginFrameSource(BeginFrameSource* source) override; | 81 void SetBeginFrameSource(BeginFrameSource* source) override; |
84 void SetEstimatedParentDrawTime(base::TimeDelta draw_time) override; | 82 void SetEstimatedParentDrawTime(base::TimeDelta draw_time) override; |
85 void DidSwapBuffersCompleteOnImplThread() override; | 83 void DidSwapBuffersCompleteOnImplThread() override; |
86 void OnCanDrawStateChanged(bool can_draw) override; | 84 void OnCanDrawStateChanged(bool can_draw) override; |
87 void NotifyReadyToActivate() override; | 85 void NotifyReadyToActivate() override; |
88 void NotifyReadyToDraw() override; | 86 void NotifyReadyToDraw() override; |
89 void SetNeedsRedrawOnImplThread() override; | 87 void SetNeedsRedrawOnImplThread() override; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 127 |
130 // Accessed on main thread only. | 128 // Accessed on main thread only. |
131 LayerTreeHost* layer_tree_host_; | 129 LayerTreeHost* layer_tree_host_; |
132 LayerTreeHostSingleThreadClient* client_; | 130 LayerTreeHostSingleThreadClient* client_; |
133 | 131 |
134 TaskRunnerProvider* task_runner_provider_; | 132 TaskRunnerProvider* task_runner_provider_; |
135 | 133 |
136 // Used on the Thread, but checked on main thread during | 134 // Used on the Thread, but checked on main thread during |
137 // initialization/shutdown. | 135 // initialization/shutdown. |
138 std::unique_ptr<LayerTreeHostImpl> layer_tree_host_impl_; | 136 std::unique_ptr<LayerTreeHostImpl> layer_tree_host_impl_; |
139 RendererCapabilities renderer_capabilities_for_main_thread_; | |
140 | 137 |
141 // Accessed from both threads. | 138 // Accessed from both threads. |
142 std::unique_ptr<BeginFrameSource> external_begin_frame_source_; | 139 std::unique_ptr<BeginFrameSource> external_begin_frame_source_; |
143 std::unique_ptr<BeginFrameSource> unthrottled_begin_frame_source_; | 140 std::unique_ptr<BeginFrameSource> unthrottled_begin_frame_source_; |
144 std::unique_ptr<SyntheticBeginFrameSource> synthetic_begin_frame_source_; | 141 std::unique_ptr<SyntheticBeginFrameSource> synthetic_begin_frame_source_; |
145 std::unique_ptr<Scheduler> scheduler_on_impl_thread_; | 142 std::unique_ptr<Scheduler> scheduler_on_impl_thread_; |
146 | 143 |
147 std::unique_ptr<BlockingTaskRunner::CapturePostTasks> | 144 std::unique_ptr<BlockingTaskRunner::CapturePostTasks> |
148 commit_blocking_task_runner_; | 145 commit_blocking_task_runner_; |
149 bool next_frame_is_newly_committed_frame_; | 146 bool next_frame_is_newly_committed_frame_; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 private: | 237 private: |
241 DebugScopedSetImplThread impl_thread_; | 238 DebugScopedSetImplThread impl_thread_; |
242 DebugScopedSetMainThreadBlocked main_thread_blocked_; | 239 DebugScopedSetMainThreadBlocked main_thread_blocked_; |
243 | 240 |
244 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); | 241 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); |
245 }; | 242 }; |
246 | 243 |
247 } // namespace cc | 244 } // namespace cc |
248 | 245 |
249 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ | 246 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ |
OLD | NEW |