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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 virtual void Start() OVERRIDE; | 64 virtual void Start() OVERRIDE; |
65 virtual void Stop() OVERRIDE; | 65 virtual void Stop() OVERRIDE; |
66 virtual size_t MaxPartialTextureUpdates() const OVERRIDE; | 66 virtual size_t MaxPartialTextureUpdates() const OVERRIDE; |
67 virtual void AcquireLayerTextures() OVERRIDE; | 67 virtual void AcquireLayerTextures() OVERRIDE; |
68 virtual void ForceSerializeOnSwapBuffers() OVERRIDE; | 68 virtual void ForceSerializeOnSwapBuffers() OVERRIDE; |
69 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE; | 69 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE; |
70 virtual bool CommitPendingForTesting() OVERRIDE; | 70 virtual bool CommitPendingForTesting() OVERRIDE; |
71 virtual scoped_ptr<base::Value> SchedulerStateAsValueForTesting() OVERRIDE; | 71 virtual scoped_ptr<base::Value> SchedulerStateAsValueForTesting() OVERRIDE; |
72 | 72 |
73 // LayerTreeHostImplClient implementation | 73 // LayerTreeHostImplClient implementation |
| 74 virtual void UpdateRendererCapabilitiesOnImplThread() OVERRIDE; |
74 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE; | 75 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE; |
75 virtual void DidSwapBuffersOnImplThread() OVERRIDE {} | 76 virtual void DidSwapBuffersOnImplThread() OVERRIDE {} |
76 virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE; | 77 virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE; |
77 virtual void BeginImplFrame(const BeginFrameArgs& args) OVERRIDE; | 78 virtual void BeginImplFrame(const BeginFrameArgs& args) OVERRIDE; |
78 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE; | 79 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE; |
79 virtual void NotifyReadyToActivate() OVERRIDE; | 80 virtual void NotifyReadyToActivate() OVERRIDE; |
80 // Please call these 2 functions through | 81 // Please call these 2 functions through |
81 // LayerTreeHostImpl's SetNeedsRedraw() and SetNeedsRedrawRect(). | 82 // LayerTreeHostImpl's SetNeedsRedraw() and SetNeedsRedrawRect(). |
82 virtual void SetNeedsRedrawOnImplThread() OVERRIDE; | 83 virtual void SetNeedsRedrawOnImplThread() OVERRIDE; |
83 virtual void SetNeedsRedrawRectOnImplThread(const gfx::Rect& dirty_rect) | 84 virtual void SetNeedsRedrawRectOnImplThread(const gfx::Rect& dirty_rect) |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 ~BeginMainFrameAndCommitState(); | 133 ~BeginMainFrameAndCommitState(); |
133 | 134 |
134 base::TimeTicks monotonic_frame_begin_time; | 135 base::TimeTicks monotonic_frame_begin_time; |
135 scoped_ptr<ScrollAndScaleSet> scroll_info; | 136 scoped_ptr<ScrollAndScaleSet> scroll_info; |
136 size_t memory_allocation_limit_bytes; | 137 size_t memory_allocation_limit_bytes; |
137 int memory_allocation_priority_cutoff; | 138 int memory_allocation_priority_cutoff; |
138 bool evicted_ui_resources; | 139 bool evicted_ui_resources; |
139 }; | 140 }; |
140 | 141 |
141 // Called on main thread. | 142 // Called on main thread. |
| 143 void SetRendererCapabilitiesMainThreadCopy( |
| 144 const RendererCapabilities& capabilities); |
142 void BeginMainFrame( | 145 void BeginMainFrame( |
143 scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state); | 146 scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state); |
144 void DidCommitAndDrawFrame(); | 147 void DidCommitAndDrawFrame(); |
145 void DidCompleteSwapBuffers(); | 148 void DidCompleteSwapBuffers(); |
146 void SetAnimationEvents(scoped_ptr<AnimationEventsVector> queue, | 149 void SetAnimationEvents(scoped_ptr<AnimationEventsVector> queue, |
147 base::Time wall_clock_time); | 150 base::Time wall_clock_time); |
148 void DoCreateAndInitializeOutputSurface(); | 151 void DoCreateAndInitializeOutputSurface(); |
149 // |capabilities| is set only when |success| is true. | 152 // |capabilities| is set only when |success| is true. |
150 void OnOutputSurfaceInitializeAttempted( | 153 void OnOutputSurfaceInitializeAttempted( |
151 bool success, | 154 bool success, |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 | 321 |
319 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; | 322 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; |
320 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; | 323 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; |
321 | 324 |
322 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 325 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
323 }; | 326 }; |
324 | 327 |
325 } // namespace cc | 328 } // namespace cc |
326 | 329 |
327 #endif // CC_TREES_THREAD_PROXY_H_ | 330 #endif // CC_TREES_THREAD_PROXY_H_ |
OLD | NEW |