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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 base::WeakPtrFactory<ThreadProxy> weak_factory; | 146 base::WeakPtrFactory<ThreadProxy> weak_factory; |
147 }; | 147 }; |
148 | 148 |
149 const MainThreadOnly& main() const; | 149 const MainThreadOnly& main() const; |
150 const MainThreadOrBlockedMainThread& blocked_main() const; | 150 const MainThreadOrBlockedMainThread& blocked_main() const; |
151 const CompositorThreadOnly& impl() const; | 151 const CompositorThreadOnly& impl() const; |
152 | 152 |
153 // Proxy implementation | 153 // Proxy implementation |
154 void FinishAllRendering() override; | 154 void FinishAllRendering() override; |
155 bool IsStarted() const override; | 155 bool IsStarted() const override; |
| 156 bool CommitToActiveTree() const override; |
156 void SetOutputSurface(scoped_ptr<OutputSurface>) override; | 157 void SetOutputSurface(scoped_ptr<OutputSurface>) override; |
157 void SetLayerTreeHostClientReady() override; | 158 void SetLayerTreeHostClientReady() override; |
158 void SetVisible(bool visible) override; | 159 void SetVisible(bool visible) override; |
159 void SetThrottleFrameProduction(bool throttle) override; | 160 void SetThrottleFrameProduction(bool throttle) override; |
160 const RendererCapabilities& GetRendererCapabilities() const override; | 161 const RendererCapabilities& GetRendererCapabilities() const override; |
161 void SetNeedsAnimate() override; | 162 void SetNeedsAnimate() override; |
162 void SetNeedsUpdateLayers() override; | 163 void SetNeedsUpdateLayers() override; |
163 void SetNeedsCommit() override; | 164 void SetNeedsCommit() override; |
164 void SetNeedsRedraw(const gfx::Rect& damage_rect) override; | 165 void SetNeedsRedraw(const gfx::Rect& damage_rect) override; |
165 void SetNextCommitWaitsForActivation() override; | 166 void SetNextCommitWaitsForActivation() override; |
166 void NotifyInputThrottledUntilCommit() override; | 167 void NotifyInputThrottledUntilCommit() override; |
167 void SetDeferCommits(bool defer_commits) override; | 168 void SetDeferCommits(bool defer_commits) override; |
168 bool CommitRequested() const override; | 169 bool CommitRequested() const override; |
169 bool BeginMainFrameRequested() const override; | 170 bool BeginMainFrameRequested() const override; |
170 void MainThreadHasStoppedFlinging() override; | 171 void MainThreadHasStoppedFlinging() override; |
171 void Start() override; | 172 void Start() override; |
172 void Stop() override; | 173 void Stop() override; |
173 size_t MaxPartialTextureUpdates() const override; | 174 size_t MaxPartialTextureUpdates() const override; |
174 void ForceSerializeOnSwapBuffers() override; | 175 void ForceSerializeOnSwapBuffers() override; |
175 bool SupportsImplScrolling() const override; | 176 bool SupportsImplScrolling() const override; |
176 void SetDebugState(const LayerTreeDebugState& debug_state) override; | 177 void SetDebugState(const LayerTreeDebugState& debug_state) override; |
177 void AsValueInto(base::debug::TracedValue* value) const override; | 178 void AsValueInto(base::trace_event::TracedValue* value) const override; |
178 bool MainFrameWillHappenForTesting() override; | 179 bool MainFrameWillHappenForTesting() override; |
179 void SetChildrenNeedBeginFrames(bool children_need_begin_frames) override; | 180 void SetChildrenNeedBeginFrames(bool children_need_begin_frames) override; |
180 | 181 |
181 // LayerTreeHostImplClient implementation | 182 // LayerTreeHostImplClient implementation |
182 void UpdateRendererCapabilitiesOnImplThread() override; | 183 void UpdateRendererCapabilitiesOnImplThread() override; |
183 void DidLoseOutputSurfaceOnImplThread() override; | 184 void DidLoseOutputSurfaceOnImplThread() override; |
184 void CommitVSyncParameters(base::TimeTicks timebase, | 185 void CommitVSyncParameters(base::TimeTicks timebase, |
185 base::TimeDelta interval) override; | 186 base::TimeDelta interval) override; |
186 void SetEstimatedParentDrawTime(base::TimeDelta draw_time) override; | 187 void SetEstimatedParentDrawTime(base::TimeDelta draw_time) override; |
187 void SetMaxSwapsPendingOnImplThread(int max) override; | 188 void SetMaxSwapsPendingOnImplThread(int max) override; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 void DeleteContentsTexturesOnImplThread(CompletionEvent* completion); | 271 void DeleteContentsTexturesOnImplThread(CompletionEvent* completion); |
271 void InitializeOutputSurfaceOnImplThread( | 272 void InitializeOutputSurfaceOnImplThread( |
272 scoped_ptr<OutputSurface> output_surface); | 273 scoped_ptr<OutputSurface> output_surface); |
273 void FinishGLOnImplThread(CompletionEvent* completion); | 274 void FinishGLOnImplThread(CompletionEvent* completion); |
274 void LayerTreeHostClosedOnImplThread(CompletionEvent* completion); | 275 void LayerTreeHostClosedOnImplThread(CompletionEvent* completion); |
275 DrawResult DrawSwapInternal(bool forced_draw); | 276 DrawResult DrawSwapInternal(bool forced_draw); |
276 void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion); | 277 void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion); |
277 void MainFrameWillHappenOnImplThreadForTesting(CompletionEvent* completion, | 278 void MainFrameWillHappenOnImplThreadForTesting(CompletionEvent* completion, |
278 bool* main_frame_will_happen); | 279 bool* main_frame_will_happen); |
279 void AsValueOnImplThread(CompletionEvent* completion, | 280 void AsValueOnImplThread(CompletionEvent* completion, |
280 base::debug::TracedValue* state) const; | 281 base::trace_event::TracedValue* state) const; |
281 void SetSwapUsedIncompleteTileOnImplThread(bool used_incomplete_tile); | 282 void SetSwapUsedIncompleteTileOnImplThread(bool used_incomplete_tile); |
282 void MainThreadHasStoppedFlingingOnImplThread(); | 283 void MainThreadHasStoppedFlingingOnImplThread(); |
283 void SetInputThrottledUntilCommitOnImplThread(bool is_throttled); | 284 void SetInputThrottledUntilCommitOnImplThread(bool is_throttled); |
284 void SetDebugStateOnImplThread(const LayerTreeDebugState& debug_state); | 285 void SetDebugStateOnImplThread(const LayerTreeDebugState& debug_state); |
285 void SetDeferCommitsOnImplThread(bool defer_commits) const; | 286 void SetDeferCommitsOnImplThread(bool defer_commits) const; |
286 | 287 |
287 LayerTreeHost* layer_tree_host(); | 288 LayerTreeHost* layer_tree_host(); |
288 const LayerTreeHost* layer_tree_host() const; | 289 const LayerTreeHost* layer_tree_host() const; |
289 | 290 |
290 // Use accessors instead of this variable directly. | 291 // Use accessors instead of this variable directly. |
(...skipping 10 matching lines...) Expand all Loading... |
301 | 302 |
302 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; | 303 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; |
303 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; | 304 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; |
304 | 305 |
305 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 306 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
306 }; | 307 }; |
307 | 308 |
308 } // namespace cc | 309 } // namespace cc |
309 | 310 |
310 #endif // CC_TREES_THREAD_PROXY_H_ | 311 #endif // CC_TREES_THREAD_PROXY_H_ |
OLD | NEW |