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