| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 class MemoryHistory; | 43 class MemoryHistory; |
| 44 class RenderingStatsInstrumentation; | 44 class RenderingStatsInstrumentation; |
| 45 class RenderPassDrawQuad; | 45 class RenderPassDrawQuad; |
| 46 class ResourceProvider; | 46 class ResourceProvider; |
| 47 class TopControlsManager; | 47 class TopControlsManager; |
| 48 struct RendererCapabilities; | 48 struct RendererCapabilities; |
| 49 | 49 |
| 50 // LayerTreeHost->Proxy callback interface. | 50 // LayerTreeHost->Proxy callback interface. |
| 51 class LayerTreeHostImplClient { | 51 class LayerTreeHostImplClient { |
| 52 public: | 52 public: |
| 53 virtual void DidUpdateCapabilitiesOnImplThread() = 0; |
| 53 virtual void DidLoseOutputSurfaceOnImplThread() = 0; | 54 virtual void DidLoseOutputSurfaceOnImplThread() = 0; |
| 54 virtual void OnSwapBuffersCompleteOnImplThread() = 0; | 55 virtual void OnSwapBuffersCompleteOnImplThread() = 0; |
| 55 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, | 56 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, |
| 56 base::TimeDelta interval) = 0; | 57 base::TimeDelta interval) = 0; |
| 57 virtual void DidVSync(base::TimeTicks frame_time) = 0; | 58 virtual void DidVSync(base::TimeTicks frame_time) = 0; |
| 58 virtual void OnCanDrawStateChanged(bool can_draw) = 0; | 59 virtual void OnCanDrawStateChanged(bool can_draw) = 0; |
| 59 virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) = 0; | 60 virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) = 0; |
| 60 virtual void SetNeedsRedrawOnImplThread() = 0; | 61 virtual void SetNeedsRedrawOnImplThread() = 0; |
| 61 virtual void SetNeedsRedrawRectOnImplThread(gfx::Rect damage_rect) = 0; | 62 virtual void SetNeedsRedrawRectOnImplThread(gfx::Rect damage_rect) = 0; |
| 62 virtual void DidInitializeVisibleTileOnImplThread() = 0; | 63 virtual void DidInitializeVisibleTileOnImplThread() = 0; |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 virtual bool HasImplThread() const OVERRIDE; | 195 virtual bool HasImplThread() const OVERRIDE; |
| 195 virtual bool ShouldClearRootRenderPass() const OVERRIDE; | 196 virtual bool ShouldClearRootRenderPass() const OVERRIDE; |
| 196 virtual CompositorFrameMetadata MakeCompositorFrameMetadata() const OVERRIDE; | 197 virtual CompositorFrameMetadata MakeCompositorFrameMetadata() const OVERRIDE; |
| 197 virtual bool AllowPartialSwap() const OVERRIDE; | 198 virtual bool AllowPartialSwap() const OVERRIDE; |
| 198 | 199 |
| 199 // TileManagerClient implementation. | 200 // TileManagerClient implementation. |
| 200 virtual void ScheduleManageTiles() OVERRIDE; | 201 virtual void ScheduleManageTiles() OVERRIDE; |
| 201 virtual void DidInitializeVisibleTile() OVERRIDE; | 202 virtual void DidInitializeVisibleTile() OVERRIDE; |
| 202 | 203 |
| 203 // OutputSurfaceClient implementation. | 204 // OutputSurfaceClient implementation. |
| 205 virtual bool InitializeForGL( |
| 206 scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE; |
| 204 virtual void SetNeedsRedrawRect(gfx::Rect rect) OVERRIDE; | 207 virtual void SetNeedsRedrawRect(gfx::Rect rect) OVERRIDE; |
| 205 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, | 208 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, |
| 206 base::TimeDelta interval) OVERRIDE; | 209 base::TimeDelta interval) OVERRIDE; |
| 207 virtual void DidVSync(base::TimeTicks frame_time) OVERRIDE; | 210 virtual void DidVSync(base::TimeTicks frame_time) OVERRIDE; |
| 208 virtual void OnSendFrameToParentCompositorAck(const CompositorFrameAck& ack) | 211 virtual void OnSendFrameToParentCompositorAck(const CompositorFrameAck& ack) |
| 209 OVERRIDE; | 212 OVERRIDE; |
| 210 | 213 |
| 211 // Called from LayerTreeImpl. | 214 // Called from LayerTreeImpl. |
| 212 void OnCanDrawStateChangedForTree(); | 215 void OnCanDrawStateChangedForTree(); |
| 213 | 216 |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 | 382 |
| 380 const AnimationRegistrar::AnimationControllerMap& | 383 const AnimationRegistrar::AnimationControllerMap& |
| 381 active_animation_controllers() const { | 384 active_animation_controllers() const { |
| 382 return animation_registrar_->active_animation_controllers(); | 385 return animation_registrar_->active_animation_controllers(); |
| 383 } | 386 } |
| 384 | 387 |
| 385 LayerTreeHostImplClient* client_; | 388 LayerTreeHostImplClient* client_; |
| 386 Proxy* proxy_; | 389 Proxy* proxy_; |
| 387 | 390 |
| 388 private: | 391 private: |
| 392 scoped_ptr<OutputSurface> CleanupForRendererInitialization(); |
| 393 bool DoInitializeRenderer(scoped_ptr<OutputSurface> output_surface); |
| 394 |
| 389 void AnimatePageScale(base::TimeTicks monotonic_time); | 395 void AnimatePageScale(base::TimeTicks monotonic_time); |
| 390 void AnimateScrollbars(base::TimeTicks monotonic_time); | 396 void AnimateScrollbars(base::TimeTicks monotonic_time); |
| 391 void AnimateTopControls(base::TimeTicks monotonic_time); | 397 void AnimateTopControls(base::TimeTicks monotonic_time); |
| 392 | 398 |
| 393 gfx::Vector2dF ScrollLayerWithViewportSpaceDelta( | 399 gfx::Vector2dF ScrollLayerWithViewportSpaceDelta( |
| 394 LayerImpl* layer_impl, | 400 LayerImpl* layer_impl, |
| 395 float scale_from_viewport_to_screen_space, | 401 float scale_from_viewport_to_screen_space, |
| 396 gfx::PointF viewport_point, | 402 gfx::PointF viewport_point, |
| 397 gfx::Vector2dF viewport_delta); | 403 gfx::Vector2dF viewport_delta); |
| 398 | 404 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 scoped_ptr<AnimationRegistrar> animation_registrar_; | 497 scoped_ptr<AnimationRegistrar> animation_registrar_; |
| 492 | 498 |
| 493 RenderingStatsInstrumentation* rendering_stats_instrumentation_; | 499 RenderingStatsInstrumentation* rendering_stats_instrumentation_; |
| 494 | 500 |
| 495 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 501 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 496 }; | 502 }; |
| 497 | 503 |
| 498 } // namespace cc | 504 } // namespace cc |
| 499 | 505 |
| 500 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 506 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |