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_LAYER_TREE_HOST_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_H_ |
6 #define CC_TREES_LAYER_TREE_HOST_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_H_ |
7 | 7 |
8 #include <limits> | 8 #include <limits> |
9 #include <list> | 9 #include <list> |
10 #include <string> | 10 #include <string> |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 static bool AnyLayerTreeHostInstanceExists(); | 138 static bool AnyLayerTreeHostInstanceExists(); |
139 | 139 |
140 void set_needs_filter_context() { needs_filter_context_ = true; } | 140 void set_needs_filter_context() { needs_filter_context_ = true; } |
141 bool needs_offscreen_context() const { | 141 bool needs_offscreen_context() const { |
142 return needs_filter_context_; | 142 return needs_filter_context_; |
143 } | 143 } |
144 | 144 |
145 // LayerTreeHost interface to Proxy. | 145 // LayerTreeHost interface to Proxy. |
146 void WillBeginMainFrame() { client_->WillBeginMainFrame(); } | 146 void WillBeginMainFrame() { client_->WillBeginMainFrame(); } |
147 void DidBeginMainFrame(); | 147 void DidBeginMainFrame(); |
148 void UpdateClientAnimations(base::TimeTicks monotonic_frame_begin_time); | 148 void UpdateClientAnimations(gfx::FrameTime monotonic_frame_begin_time); |
149 void AnimateLayers(base::TimeTicks monotonic_frame_begin_time); | 149 void AnimateLayers(gfx::FrameTime monotonic_frame_begin_time); |
150 void DidStopFlinging(); | 150 void DidStopFlinging(); |
151 void Layout(); | 151 void Layout(); |
152 void BeginCommitOnImplThread(LayerTreeHostImpl* host_impl); | 152 void BeginCommitOnImplThread(LayerTreeHostImpl* host_impl); |
153 void FinishCommitOnImplThread(LayerTreeHostImpl* host_impl); | 153 void FinishCommitOnImplThread(LayerTreeHostImpl* host_impl); |
154 void WillCommit(); | 154 void WillCommit(); |
155 void CommitComplete(); | 155 void CommitComplete(); |
156 scoped_ptr<OutputSurface> CreateOutputSurface(); | 156 scoped_ptr<OutputSurface> CreateOutputSurface(); |
157 virtual scoped_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl( | 157 virtual scoped_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl( |
158 LayerTreeHostImplClient* client); | 158 LayerTreeHostImplClient* client); |
159 void DidLoseOutputSurface(); | 159 void DidLoseOutputSurface(); |
(...skipping 12 matching lines...) Expand all Loading... |
172 bool InitializeOutputSurfaceIfNeeded(); | 172 bool InitializeOutputSurfaceIfNeeded(); |
173 bool UpdateLayers(ResourceUpdateQueue* queue); | 173 bool UpdateLayers(ResourceUpdateQueue* queue); |
174 | 174 |
175 LayerTreeHostClient* client() { return client_; } | 175 LayerTreeHostClient* client() { return client_; } |
176 const base::WeakPtr<InputHandler>& GetInputHandler() { | 176 const base::WeakPtr<InputHandler>& GetInputHandler() { |
177 return input_handler_weak_ptr_; | 177 return input_handler_weak_ptr_; |
178 } | 178 } |
179 | 179 |
180 void NotifyInputThrottledUntilCommit(); | 180 void NotifyInputThrottledUntilCommit(); |
181 | 181 |
182 void Composite(base::TimeTicks frame_begin_time); | 182 void Composite(gfx::FrameTime frame_begin_time); |
183 | 183 |
184 // Only used when compositing on the main thread. | 184 // Only used when compositing on the main thread. |
185 void ScheduleComposite(); | 185 void ScheduleComposite(); |
186 | 186 |
187 // Composites and attempts to read back the result into the provided | 187 // Composites and attempts to read back the result into the provided |
188 // buffer. If it wasn't possible, e.g. due to context lost, will return | 188 // buffer. If it wasn't possible, e.g. due to context lost, will return |
189 // false. | 189 // false. |
190 bool CompositeAndReadback(void* pixels, gfx::Rect rect_in_device_viewport); | 190 bool CompositeAndReadback(void* pixels, gfx::Rect rect_in_device_viewport); |
191 | 191 |
192 void FinishAllRendering(); | 192 void FinishAllRendering(); |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 scoped_refptr<Layer> outer_viewport_scroll_layer_; | 472 scoped_refptr<Layer> outer_viewport_scroll_layer_; |
473 | 473 |
474 SharedBitmapManager* shared_bitmap_manager_; | 474 SharedBitmapManager* shared_bitmap_manager_; |
475 | 475 |
476 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 476 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
477 }; | 477 }; |
478 | 478 |
479 } // namespace cc | 479 } // namespace cc |
480 | 480 |
481 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 481 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
OLD | NEW |