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_IMPL_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 gfx::SizeF UnscaledScrollableViewportSize() const; | 215 gfx::SizeF UnscaledScrollableViewportSize() const; |
216 float VerticalAdjust() const; | 216 float VerticalAdjust() const; |
217 | 217 |
218 // RendererClient implementation. | 218 // RendererClient implementation. |
219 virtual void SetFullRootLayerDamage() OVERRIDE; | 219 virtual void SetFullRootLayerDamage() OVERRIDE; |
220 | 220 |
221 // TileManagerClient implementation. | 221 // TileManagerClient implementation. |
222 virtual void NotifyReadyToActivate() OVERRIDE; | 222 virtual void NotifyReadyToActivate() OVERRIDE; |
223 | 223 |
224 // OutputSurfaceClient implementation. | 224 // OutputSurfaceClient implementation. |
225 virtual bool DeferredInitialize( | 225 virtual void DeferredInitialize() OVERRIDE; |
226 scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE; | |
227 virtual void ReleaseGL() OVERRIDE; | 226 virtual void ReleaseGL() OVERRIDE; |
228 virtual void SetNeedsRedrawRect(const gfx::Rect& rect) OVERRIDE; | 227 virtual void SetNeedsRedrawRect(const gfx::Rect& rect) OVERRIDE; |
229 virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE; | 228 virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE; |
230 virtual void SetExternalDrawConstraints( | 229 virtual void SetExternalDrawConstraints( |
231 const gfx::Transform& transform, | 230 const gfx::Transform& transform, |
232 const gfx::Rect& viewport, | 231 const gfx::Rect& viewport, |
233 const gfx::Rect& clip, | 232 const gfx::Rect& clip, |
234 bool valid_for_tile_management) OVERRIDE; | 233 bool valid_for_tile_management) OVERRIDE; |
235 virtual void DidLoseOutputSurface() OVERRIDE; | 234 virtual void DidLoseOutputSurface() OVERRIDE; |
236 virtual void DidSwapBuffers() OVERRIDE; | 235 virtual void DidSwapBuffers() OVERRIDE; |
237 virtual void DidSwapBuffersComplete() OVERRIDE; | 236 virtual void DidSwapBuffersComplete() OVERRIDE; |
238 virtual void ReclaimResources(const CompositorFrameAck* ack) OVERRIDE; | 237 virtual void ReclaimResources(const CompositorFrameAck* ack) OVERRIDE; |
239 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE; | 238 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE; |
240 virtual void SetTreeActivationCallback(const base::Closure& callback) | 239 virtual void SetTreeActivationCallback(const base::Closure& callback) |
241 OVERRIDE; | 240 OVERRIDE; |
242 | 241 |
243 // Called from LayerTreeImpl. | 242 // Called from LayerTreeImpl. |
244 void OnCanDrawStateChangedForTree(); | 243 void OnCanDrawStateChangedForTree(); |
245 | 244 |
246 // Implementation. | 245 // Implementation. |
247 bool CanDraw() const; | 246 bool CanDraw() const; |
248 OutputSurface* output_surface() const { return output_surface_.get(); } | 247 OutputSurface* output_surface() const { return output_surface_.get(); } |
249 | 248 |
250 void SetOffscreenContextProvider( | |
251 const scoped_refptr<ContextProvider>& offscreen_context_provider); | |
252 ContextProvider* offscreen_context_provider() const { | |
253 return offscreen_context_provider_.get(); | |
254 } | |
255 | |
256 std::string LayerTreeAsJson() const; | 249 std::string LayerTreeAsJson() const; |
257 | 250 |
258 void FinishAllRendering(); | 251 void FinishAllRendering(); |
259 int SourceAnimationFrameNumber() const; | 252 int SourceAnimationFrameNumber() const; |
260 | 253 |
261 virtual bool InitializeRenderer(scoped_ptr<OutputSurface> output_surface); | 254 virtual bool InitializeRenderer(scoped_ptr<OutputSurface> output_surface); |
262 bool IsContextLost(); | 255 bool IsContextLost(); |
263 TileManager* tile_manager() { return tile_manager_.get(); } | 256 TileManager* tile_manager() { return tile_manager_.get(); } |
264 Renderer* renderer() { return renderer_.get(); } | 257 Renderer* renderer() { return renderer_.get(); } |
265 const RendererCapabilitiesImpl& GetRendererCapabilities() const; | 258 const RendererCapabilitiesImpl& GetRendererCapabilities() const; |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 int id_; | 648 int id_; |
656 | 649 |
657 std::set<SwapPromiseMonitor*> swap_promise_monitor_; | 650 std::set<SwapPromiseMonitor*> swap_promise_monitor_; |
658 | 651 |
659 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 652 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
660 }; | 653 }; |
661 | 654 |
662 } // namespace cc | 655 } // namespace cc |
663 | 656 |
664 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 657 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |