| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 bool BeginMainFrameRequested() const override; | 171 bool BeginMainFrameRequested() const override; |
| 172 void MainThreadHasStoppedFlinging() override; | 172 void MainThreadHasStoppedFlinging() override; |
| 173 void Start() override; | 173 void Start() override; |
| 174 void Stop() override; | 174 void Stop() override; |
| 175 void ForceSerializeOnSwapBuffers() override; | 175 void ForceSerializeOnSwapBuffers() override; |
| 176 bool SupportsImplScrolling() const override; | 176 bool SupportsImplScrolling() const override; |
| 177 void SetDebugState(const LayerTreeDebugState& debug_state) override; | 177 void SetDebugState(const LayerTreeDebugState& debug_state) override; |
| 178 bool MainFrameWillHappenForTesting() override; | 178 bool MainFrameWillHappenForTesting() override; |
| 179 void SetChildrenNeedBeginFrames(bool children_need_begin_frames) override; | 179 void SetChildrenNeedBeginFrames(bool children_need_begin_frames) override; |
| 180 void SetAuthoritativeVSyncInterval(const base::TimeDelta& interval) override; | 180 void SetAuthoritativeVSyncInterval(const base::TimeDelta& interval) override; |
| 181 scoped_ptr<OutputSurface> ReleaseOutputSurface() override; |
| 181 | 182 |
| 182 // LayerTreeHostImplClient implementation | 183 // LayerTreeHostImplClient implementation |
| 183 void UpdateRendererCapabilitiesOnImplThread() override; | 184 void UpdateRendererCapabilitiesOnImplThread() override; |
| 184 void DidLoseOutputSurfaceOnImplThread() override; | 185 void DidLoseOutputSurfaceOnImplThread() override; |
| 185 void CommitVSyncParameters(base::TimeTicks timebase, | 186 void CommitVSyncParameters(base::TimeTicks timebase, |
| 186 base::TimeDelta interval) override; | 187 base::TimeDelta interval) override; |
| 187 void SetEstimatedParentDrawTime(base::TimeDelta draw_time) override; | 188 void SetEstimatedParentDrawTime(base::TimeDelta draw_time) override; |
| 188 void SetMaxSwapsPendingOnImplThread(int max) override; | 189 void SetMaxSwapsPendingOnImplThread(int max) override; |
| 189 void DidSwapBuffersOnImplThread() override; | 190 void DidSwapBuffersOnImplThread() override; |
| 190 void DidSwapBuffersCompleteOnImplThread() override; | 191 void DidSwapBuffersCompleteOnImplThread() override; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 void InitializeImplOnImplThread(CompletionEvent* completion); | 269 void InitializeImplOnImplThread(CompletionEvent* completion); |
| 269 void SetLayerTreeHostClientReadyOnImplThread(); | 270 void SetLayerTreeHostClientReadyOnImplThread(); |
| 270 void SetVisibleOnImplThread(CompletionEvent* completion, bool visible); | 271 void SetVisibleOnImplThread(CompletionEvent* completion, bool visible); |
| 271 void SetThrottleFrameProductionOnImplThread(bool throttle); | 272 void SetThrottleFrameProductionOnImplThread(bool throttle); |
| 272 void HasInitializedOutputSurfaceOnImplThread( | 273 void HasInitializedOutputSurfaceOnImplThread( |
| 273 CompletionEvent* completion, | 274 CompletionEvent* completion, |
| 274 bool* has_initialized_output_surface); | 275 bool* has_initialized_output_surface); |
| 275 void DeleteContentsTexturesOnImplThread(CompletionEvent* completion); | 276 void DeleteContentsTexturesOnImplThread(CompletionEvent* completion); |
| 276 void InitializeOutputSurfaceOnImplThread( | 277 void InitializeOutputSurfaceOnImplThread( |
| 277 scoped_ptr<OutputSurface> output_surface); | 278 scoped_ptr<OutputSurface> output_surface); |
| 279 void ReleaseOutputSurfaceOnImplThread(CompletionEvent* completion); |
| 278 void FinishGLOnImplThread(CompletionEvent* completion); | 280 void FinishGLOnImplThread(CompletionEvent* completion); |
| 279 void LayerTreeHostClosedOnImplThread(CompletionEvent* completion); | 281 void LayerTreeHostClosedOnImplThread(CompletionEvent* completion); |
| 280 DrawResult DrawSwapInternal(bool forced_draw); | 282 DrawResult DrawSwapInternal(bool forced_draw); |
| 281 void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion); | 283 void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion); |
| 282 void MainFrameWillHappenOnImplThreadForTesting(CompletionEvent* completion, | 284 void MainFrameWillHappenOnImplThreadForTesting(CompletionEvent* completion, |
| 283 bool* main_frame_will_happen); | 285 bool* main_frame_will_happen); |
| 284 void SetSwapUsedIncompleteTileOnImplThread(bool used_incomplete_tile); | 286 void SetSwapUsedIncompleteTileOnImplThread(bool used_incomplete_tile); |
| 285 void MainThreadHasStoppedFlingingOnImplThread(); | 287 void MainThreadHasStoppedFlingingOnImplThread(); |
| 286 void SetInputThrottledUntilCommitOnImplThread(bool is_throttled); | 288 void SetInputThrottledUntilCommitOnImplThread(bool is_throttled); |
| 287 void SetDebugStateOnImplThread(const LayerTreeDebugState& debug_state); | 289 void SetDebugStateOnImplThread(const LayerTreeDebugState& debug_state); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 298 MainThreadOnly& main(); | 300 MainThreadOnly& main(); |
| 299 | 301 |
| 300 // Use accessors instead of this variable directly. | 302 // Use accessors instead of this variable directly. |
| 301 MainThreadOrBlockedMainThread main_thread_or_blocked_vars_unsafe_; | 303 MainThreadOrBlockedMainThread main_thread_or_blocked_vars_unsafe_; |
| 302 MainThreadOrBlockedMainThread& blocked_main(); | 304 MainThreadOrBlockedMainThread& blocked_main(); |
| 303 | 305 |
| 304 // Use accessors instead of this variable directly. | 306 // Use accessors instead of this variable directly. |
| 305 CompositorThreadOnly compositor_thread_vars_unsafe_; | 307 CompositorThreadOnly compositor_thread_vars_unsafe_; |
| 306 CompositorThreadOnly& impl(); | 308 CompositorThreadOnly& impl(); |
| 307 | 309 |
| 310 scoped_ptr<cc::OutputSurface> output_surface_; |
| 311 |
| 308 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; | 312 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; |
| 309 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; | 313 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; |
| 310 | 314 |
| 311 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 315 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
| 312 }; | 316 }; |
| 313 | 317 |
| 314 } // namespace cc | 318 } // namespace cc |
| 315 | 319 |
| 316 #endif // CC_TREES_THREAD_PROXY_H_ | 320 #endif // CC_TREES_THREAD_PROXY_H_ |
| OLD | NEW |