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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 virtual void SetDeferCommits(bool defer_commits) OVERRIDE; | 166 virtual void SetDeferCommits(bool defer_commits) OVERRIDE; |
167 virtual bool CommitRequested() const OVERRIDE; | 167 virtual bool CommitRequested() const OVERRIDE; |
168 virtual bool BeginMainFrameRequested() const OVERRIDE; | 168 virtual bool BeginMainFrameRequested() const OVERRIDE; |
169 virtual void MainThreadHasStoppedFlinging() OVERRIDE; | 169 virtual void MainThreadHasStoppedFlinging() OVERRIDE; |
170 virtual void Start() OVERRIDE; | 170 virtual void Start() OVERRIDE; |
171 virtual void Stop() OVERRIDE; | 171 virtual void Stop() OVERRIDE; |
172 virtual size_t MaxPartialTextureUpdates() const OVERRIDE; | 172 virtual size_t MaxPartialTextureUpdates() const OVERRIDE; |
173 virtual void ForceSerializeOnSwapBuffers() OVERRIDE; | 173 virtual void ForceSerializeOnSwapBuffers() OVERRIDE; |
174 virtual bool SupportsImplScrolling() const OVERRIDE; | 174 virtual bool SupportsImplScrolling() const OVERRIDE; |
175 virtual void SetDebugState(const LayerTreeDebugState& debug_state) OVERRIDE; | 175 virtual void SetDebugState(const LayerTreeDebugState& debug_state) OVERRIDE; |
176 virtual void AsValueInto(base::debug::TracedValue* value) const OVERRIDE; | 176 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE; |
177 virtual bool CommitPendingForTesting() OVERRIDE; | 177 virtual bool CommitPendingForTesting() OVERRIDE; |
| 178 virtual scoped_ptr<base::Value> SchedulerAsValueForTesting() OVERRIDE; |
178 | 179 |
179 // LayerTreeHostImplClient implementation | 180 // LayerTreeHostImplClient implementation |
180 virtual void UpdateRendererCapabilitiesOnImplThread() OVERRIDE; | 181 virtual void UpdateRendererCapabilitiesOnImplThread() OVERRIDE; |
181 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE; | 182 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE; |
182 virtual void CommitVSyncParameters(base::TimeTicks timebase, | 183 virtual void CommitVSyncParameters(base::TimeTicks timebase, |
183 base::TimeDelta interval) OVERRIDE; | 184 base::TimeDelta interval) OVERRIDE; |
184 virtual void SetEstimatedParentDrawTime(base::TimeDelta draw_time) OVERRIDE; | 185 virtual void SetEstimatedParentDrawTime(base::TimeDelta draw_time) OVERRIDE; |
185 virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE; | 186 virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE; |
186 virtual void SetMaxSwapsPendingOnImplThread(int max) OVERRIDE; | 187 virtual void SetMaxSwapsPendingOnImplThread(int max) OVERRIDE; |
187 virtual void DidSwapBuffersOnImplThread() OVERRIDE; | 188 virtual void DidSwapBuffersOnImplThread() OVERRIDE; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 bool* has_initialized_output_surface); | 270 bool* has_initialized_output_surface); |
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 CheckOutputSurfaceStatusOnImplThread(); | 278 void CheckOutputSurfaceStatusOnImplThread(); |
278 void CommitPendingOnImplThreadForTesting(CommitPendingRequest* request); | 279 void CommitPendingOnImplThreadForTesting(CommitPendingRequest* request); |
| 280 void SchedulerAsValueOnImplThreadForTesting(SchedulerStateRequest* request); |
279 void AsValueOnImplThread(CompletionEvent* completion, | 281 void AsValueOnImplThread(CompletionEvent* completion, |
280 base::debug::TracedValue* state) const; | 282 base::DictionaryValue* state) const; |
281 void SetSwapUsedIncompleteTileOnImplThread(bool used_incomplete_tile); | 283 void SetSwapUsedIncompleteTileOnImplThread(bool used_incomplete_tile); |
282 void MainThreadHasStoppedFlingingOnImplThread(); | 284 void MainThreadHasStoppedFlingingOnImplThread(); |
283 void SetInputThrottledUntilCommitOnImplThread(bool is_throttled); | 285 void SetInputThrottledUntilCommitOnImplThread(bool is_throttled); |
284 void SetDebugStateOnImplThread(const LayerTreeDebugState& debug_state); | 286 void SetDebugStateOnImplThread(const LayerTreeDebugState& debug_state); |
285 | 287 |
286 LayerTreeHost* layer_tree_host(); | 288 LayerTreeHost* layer_tree_host(); |
287 const LayerTreeHost* layer_tree_host() const; | 289 const LayerTreeHost* layer_tree_host() const; |
288 | 290 |
289 // Use accessors instead of this variable directly. | 291 // Use accessors instead of this variable directly. |
290 MainThreadOnly main_thread_only_vars_unsafe_; | 292 MainThreadOnly main_thread_only_vars_unsafe_; |
291 MainThreadOnly& main(); | 293 MainThreadOnly& main(); |
292 | 294 |
293 // Use accessors instead of this variable directly. | 295 // Use accessors instead of this variable directly. |
294 MainThreadOrBlockedMainThread main_thread_or_blocked_vars_unsafe_; | 296 MainThreadOrBlockedMainThread main_thread_or_blocked_vars_unsafe_; |
295 MainThreadOrBlockedMainThread& blocked_main(); | 297 MainThreadOrBlockedMainThread& blocked_main(); |
296 | 298 |
297 // Use accessors instead of this variable directly. | 299 // Use accessors instead of this variable directly. |
298 CompositorThreadOnly compositor_thread_vars_unsafe_; | 300 CompositorThreadOnly compositor_thread_vars_unsafe_; |
299 CompositorThreadOnly& impl(); | 301 CompositorThreadOnly& impl(); |
300 | 302 |
301 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; | 303 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; |
302 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; | 304 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; |
303 | 305 |
304 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 306 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
305 }; | 307 }; |
306 | 308 |
307 } // namespace cc | 309 } // namespace cc |
308 | 310 |
309 #endif // CC_TREES_THREAD_PROXY_H_ | 311 #endif // CC_TREES_THREAD_PROXY_H_ |
OLD | NEW |