| 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 DidTryInitializeRendererOnImplThread( |
| 54 bool success, |
| 55 scoped_refptr<ContextProvider> offscreen_context_provider) = 0; |
| 53 virtual void DidLoseOutputSurfaceOnImplThread() = 0; | 56 virtual void DidLoseOutputSurfaceOnImplThread() = 0; |
| 54 virtual void OnSwapBuffersCompleteOnImplThread() = 0; | 57 virtual void OnSwapBuffersCompleteOnImplThread() = 0; |
| 55 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, | 58 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, |
| 56 base::TimeDelta interval) = 0; | 59 base::TimeDelta interval) = 0; |
| 57 virtual void BeginFrameOnImplThread(base::TimeTicks frame_time) = 0; | 60 virtual void BeginFrameOnImplThread(base::TimeTicks frame_time) = 0; |
| 58 virtual void OnCanDrawStateChanged(bool can_draw) = 0; | 61 virtual void OnCanDrawStateChanged(bool can_draw) = 0; |
| 59 virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) = 0; | 62 virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) = 0; |
| 60 virtual void SetNeedsRedrawOnImplThread() = 0; | 63 virtual void SetNeedsRedrawOnImplThread() = 0; |
| 61 virtual void SetNeedsRedrawRectOnImplThread(gfx::Rect damage_rect) = 0; | 64 virtual void SetNeedsRedrawRectOnImplThread(gfx::Rect damage_rect) = 0; |
| 62 virtual void DidInitializeVisibleTileOnImplThread() = 0; | 65 virtual void DidInitializeVisibleTileOnImplThread() = 0; |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 virtual CompositorFrameMetadata MakeCompositorFrameMetadata() const OVERRIDE; | 196 virtual CompositorFrameMetadata MakeCompositorFrameMetadata() const OVERRIDE; |
| 194 virtual bool AllowPartialSwap() const OVERRIDE; | 197 virtual bool AllowPartialSwap() const OVERRIDE; |
| 195 | 198 |
| 196 // TileManagerClient implementation. | 199 // TileManagerClient implementation. |
| 197 virtual void ScheduleManageTiles() OVERRIDE; | 200 virtual void ScheduleManageTiles() OVERRIDE; |
| 198 virtual void DidInitializeVisibleTile() OVERRIDE; | 201 virtual void DidInitializeVisibleTile() OVERRIDE; |
| 199 virtual bool ShouldForceTileUploadsRequiredForActivationToComplete() const | 202 virtual bool ShouldForceTileUploadsRequiredForActivationToComplete() const |
| 200 OVERRIDE; | 203 OVERRIDE; |
| 201 | 204 |
| 202 // OutputSurfaceClient implementation. | 205 // OutputSurfaceClient implementation. |
| 206 virtual bool DeferredInitialize( |
| 207 scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE; |
| 203 virtual void SetNeedsRedrawRect(gfx::Rect rect) OVERRIDE; | 208 virtual void SetNeedsRedrawRect(gfx::Rect rect) OVERRIDE; |
| 204 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, | 209 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, |
| 205 base::TimeDelta interval) OVERRIDE; | 210 base::TimeDelta interval) OVERRIDE; |
| 206 virtual void BeginFrame(base::TimeTicks frame_time) | 211 virtual void BeginFrame(base::TimeTicks frame_time) |
| 207 OVERRIDE; | 212 OVERRIDE; |
| 208 virtual void OnSendFrameToParentCompositorAck(const CompositorFrameAck& ack) | 213 virtual void OnSendFrameToParentCompositorAck(const CompositorFrameAck& ack) |
| 209 OVERRIDE; | 214 OVERRIDE; |
| 210 | 215 |
| 211 // Called from LayerTreeImpl. | 216 // Called from LayerTreeImpl. |
| 212 void OnCanDrawStateChangedForTree(); | 217 void OnCanDrawStateChangedForTree(); |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 | 391 |
| 387 const AnimationRegistrar::AnimationControllerMap& | 392 const AnimationRegistrar::AnimationControllerMap& |
| 388 active_animation_controllers() const { | 393 active_animation_controllers() const { |
| 389 return animation_registrar_->active_animation_controllers(); | 394 return animation_registrar_->active_animation_controllers(); |
| 390 } | 395 } |
| 391 | 396 |
| 392 LayerTreeHostImplClient* client_; | 397 LayerTreeHostImplClient* client_; |
| 393 Proxy* proxy_; | 398 Proxy* proxy_; |
| 394 | 399 |
| 395 private: | 400 private: |
| 401 bool DoInitializeRenderer(scoped_ptr<OutputSurface> output_surface, |
| 402 bool is_deffered_init); |
| 403 |
| 396 void AnimatePageScale(base::TimeTicks monotonic_time); | 404 void AnimatePageScale(base::TimeTicks monotonic_time); |
| 397 void AnimateScrollbars(base::TimeTicks monotonic_time); | 405 void AnimateScrollbars(base::TimeTicks monotonic_time); |
| 398 void AnimateTopControls(base::TimeTicks monotonic_time); | 406 void AnimateTopControls(base::TimeTicks monotonic_time); |
| 399 | 407 |
| 400 gfx::Vector2dF ScrollLayerWithViewportSpaceDelta( | 408 gfx::Vector2dF ScrollLayerWithViewportSpaceDelta( |
| 401 LayerImpl* layer_impl, | 409 LayerImpl* layer_impl, |
| 402 float scale_from_viewport_to_screen_space, | 410 float scale_from_viewport_to_screen_space, |
| 403 gfx::PointF viewport_point, | 411 gfx::PointF viewport_point, |
| 404 gfx::Vector2dF viewport_delta); | 412 gfx::Vector2dF viewport_delta); |
| 405 | 413 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 scoped_ptr<AnimationRegistrar> animation_registrar_; | 509 scoped_ptr<AnimationRegistrar> animation_registrar_; |
| 502 | 510 |
| 503 RenderingStatsInstrumentation* rendering_stats_instrumentation_; | 511 RenderingStatsInstrumentation* rendering_stats_instrumentation_; |
| 504 | 512 |
| 505 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 513 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 506 }; | 514 }; |
| 507 | 515 |
| 508 } // namespace cc | 516 } // namespace cc |
| 509 | 517 |
| 510 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 518 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |