| 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 base::WeakPtrFactory<ThreadProxy> weak_factory; | 142 base::WeakPtrFactory<ThreadProxy> weak_factory; |
| 143 }; | 143 }; |
| 144 | 144 |
| 145 const MainThreadOnly& main() const; | 145 const MainThreadOnly& main() const; |
| 146 const MainThreadOrBlockedMainThread& blocked_main() const; | 146 const MainThreadOrBlockedMainThread& blocked_main() const; |
| 147 const CompositorThreadOnly& impl() const; | 147 const CompositorThreadOnly& impl() const; |
| 148 | 148 |
| 149 // Proxy implementation | 149 // Proxy implementation |
| 150 virtual void FinishAllRendering() OVERRIDE; | 150 virtual void FinishAllRendering() OVERRIDE; |
| 151 virtual bool IsStarted() const OVERRIDE; | 151 virtual bool IsStarted() const OVERRIDE; |
| 152 virtual void SetOutputSurface(scoped_ptr<OutputSurface>) OVERRIDE; |
| 152 virtual void SetLayerTreeHostClientReady() OVERRIDE; | 153 virtual void SetLayerTreeHostClientReady() OVERRIDE; |
| 153 virtual void SetVisible(bool visible) OVERRIDE; | 154 virtual void SetVisible(bool visible) OVERRIDE; |
| 154 virtual const RendererCapabilities& GetRendererCapabilities() const OVERRIDE; | 155 virtual const RendererCapabilities& GetRendererCapabilities() const OVERRIDE; |
| 155 virtual void SetNeedsAnimate() OVERRIDE; | 156 virtual void SetNeedsAnimate() OVERRIDE; |
| 156 virtual void SetNeedsUpdateLayers() OVERRIDE; | 157 virtual void SetNeedsUpdateLayers() OVERRIDE; |
| 157 virtual void SetNeedsCommit() OVERRIDE; | 158 virtual void SetNeedsCommit() OVERRIDE; |
| 158 virtual void SetNeedsRedraw(const gfx::Rect& damage_rect) OVERRIDE; | 159 virtual void SetNeedsRedraw(const gfx::Rect& damage_rect) OVERRIDE; |
| 159 virtual void SetNextCommitWaitsForActivation() OVERRIDE; | 160 virtual void SetNextCommitWaitsForActivation() OVERRIDE; |
| 160 virtual void NotifyInputThrottledUntilCommit() OVERRIDE; | 161 virtual void NotifyInputThrottledUntilCommit() OVERRIDE; |
| 161 virtual void SetDeferCommits(bool defer_commits) OVERRIDE; | 162 virtual void SetDeferCommits(bool defer_commits) OVERRIDE; |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 private: | 235 private: |
| 235 // Called on main thread. | 236 // Called on main thread. |
| 236 void SetRendererCapabilitiesMainThreadCopy( | 237 void SetRendererCapabilitiesMainThreadCopy( |
| 237 const RendererCapabilities& capabilities); | 238 const RendererCapabilities& capabilities); |
| 238 void BeginMainFrame( | 239 void BeginMainFrame( |
| 239 scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state); | 240 scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state); |
| 240 void DidCommitAndDrawFrame(); | 241 void DidCommitAndDrawFrame(); |
| 241 void DidCompleteSwapBuffers(); | 242 void DidCompleteSwapBuffers(); |
| 242 void SetAnimationEvents(scoped_ptr<AnimationEventsVector> queue); | 243 void SetAnimationEvents(scoped_ptr<AnimationEventsVector> queue); |
| 243 void DidLoseOutputSurface(); | 244 void DidLoseOutputSurface(); |
| 244 void CreateAndInitializeOutputSurface(); | 245 void RequestNewOutputSurface(); |
| 245 void DidInitializeOutputSurface(bool success, | 246 void DidInitializeOutputSurface(bool success, |
| 246 const RendererCapabilities& capabilities); | 247 const RendererCapabilities& capabilities); |
| 247 void SendCommitRequestToImplThreadIfNeeded(); | 248 void SendCommitRequestToImplThreadIfNeeded(); |
| 248 | 249 |
| 249 // Called on impl thread. | 250 // Called on impl thread. |
| 250 struct CommitPendingRequest; | 251 struct CommitPendingRequest; |
| 251 struct SchedulerStateRequest; | 252 struct SchedulerStateRequest; |
| 252 | 253 |
| 253 void StartCommitOnImplThread(CompletionEvent* completion, | 254 void StartCommitOnImplThread(CompletionEvent* completion, |
| 254 ResourceUpdateQueue* queue); | 255 ResourceUpdateQueue* queue); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 | 296 |
| 296 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; | 297 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; |
| 297 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; | 298 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; |
| 298 | 299 |
| 299 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 300 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
| 300 }; | 301 }; |
| 301 | 302 |
| 302 } // namespace cc | 303 } // namespace cc |
| 303 | 304 |
| 304 #endif // CC_TREES_THREAD_PROXY_H_ | 305 #endif // CC_TREES_THREAD_PROXY_H_ |
| OLD | NEW |