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/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 static scoped_ptr<Proxy> Create( | 28 static scoped_ptr<Proxy> Create( |
29 LayerTreeHost* layer_tree_host, | 29 LayerTreeHost* layer_tree_host, |
30 LayerTreeHostSingleThreadClient* client, | 30 LayerTreeHostSingleThreadClient* client, |
31 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner); | 31 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner); |
32 virtual ~SingleThreadProxy(); | 32 virtual ~SingleThreadProxy(); |
33 | 33 |
34 // Proxy implementation | 34 // Proxy implementation |
35 virtual void FinishAllRendering() OVERRIDE; | 35 virtual void FinishAllRendering() OVERRIDE; |
36 virtual bool IsStarted() const OVERRIDE; | 36 virtual bool IsStarted() const OVERRIDE; |
37 virtual void SetLayerTreeHostClientReady() OVERRIDE; | 37 virtual void SetLayerTreeHostClientReady() OVERRIDE; |
| 38 virtual void SetLayerTreeHostClientFinished() OVERRIDE; |
38 virtual void SetVisible(bool visible) OVERRIDE; | 39 virtual void SetVisible(bool visible) OVERRIDE; |
39 virtual const RendererCapabilities& GetRendererCapabilities() const OVERRIDE; | 40 virtual const RendererCapabilities& GetRendererCapabilities() const OVERRIDE; |
40 virtual void SetNeedsAnimate() OVERRIDE; | 41 virtual void SetNeedsAnimate() OVERRIDE; |
41 virtual void SetNeedsUpdateLayers() OVERRIDE; | 42 virtual void SetNeedsUpdateLayers() OVERRIDE; |
42 virtual void SetNeedsCommit() OVERRIDE; | 43 virtual void SetNeedsCommit() OVERRIDE; |
43 virtual void SetNeedsRedraw(const gfx::Rect& damage_rect) OVERRIDE; | 44 virtual void SetNeedsRedraw(const gfx::Rect& damage_rect) OVERRIDE; |
44 virtual void SetNextCommitWaitsForActivation() OVERRIDE; | 45 virtual void SetNextCommitWaitsForActivation() OVERRIDE; |
45 virtual void NotifyInputThrottledUntilCommit() OVERRIDE {} | 46 virtual void NotifyInputThrottledUntilCommit() OVERRIDE {} |
46 virtual void SetDeferCommits(bool defer_commits) OVERRIDE; | 47 virtual void SetDeferCommits(bool defer_commits) OVERRIDE; |
47 virtual bool CommitRequested() const OVERRIDE; | 48 virtual bool CommitRequested() const OVERRIDE; |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 // Accessed from both threads. | 143 // Accessed from both threads. |
143 scoped_ptr<Scheduler> scheduler_on_impl_thread_; | 144 scoped_ptr<Scheduler> scheduler_on_impl_thread_; |
144 ProxyTimingHistory timing_history_; | 145 ProxyTimingHistory timing_history_; |
145 | 146 |
146 bool next_frame_is_newly_committed_frame_; | 147 bool next_frame_is_newly_committed_frame_; |
147 | 148 |
148 bool inside_draw_; | 149 bool inside_draw_; |
149 bool defer_commits_; | 150 bool defer_commits_; |
150 bool commit_was_deferred_; | 151 bool commit_was_deferred_; |
151 bool commit_requested_; | 152 bool commit_requested_; |
| 153 bool host_client_finished_; |
152 | 154 |
153 base::WeakPtrFactory<SingleThreadProxy> weak_factory_; | 155 base::WeakPtrFactory<SingleThreadProxy> weak_factory_; |
154 | 156 |
155 DISALLOW_COPY_AND_ASSIGN(SingleThreadProxy); | 157 DISALLOW_COPY_AND_ASSIGN(SingleThreadProxy); |
156 }; | 158 }; |
157 | 159 |
158 // For use in the single-threaded case. In debug builds, it pretends that the | 160 // For use in the single-threaded case. In debug builds, it pretends that the |
159 // code is running on the impl thread to satisfy assertion checks. | 161 // code is running on the impl thread to satisfy assertion checks. |
160 class DebugScopedSetImplThread { | 162 class DebugScopedSetImplThread { |
161 public: | 163 public: |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 private: | 214 private: |
213 DebugScopedSetImplThread impl_thread_; | 215 DebugScopedSetImplThread impl_thread_; |
214 DebugScopedSetMainThreadBlocked main_thread_blocked_; | 216 DebugScopedSetMainThreadBlocked main_thread_blocked_; |
215 | 217 |
216 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); | 218 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); |
217 }; | 219 }; |
218 | 220 |
219 } // namespace cc | 221 } // namespace cc |
220 | 222 |
221 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ | 223 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ |
OLD | NEW |