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 virtual void SetExternalDrawConstraints(const gfx::Transform& transform, | 215 virtual void SetExternalDrawConstraints(const gfx::Transform& transform, |
211 gfx::Rect viewport) OVERRIDE; | 216 gfx::Rect viewport) OVERRIDE; |
212 | 217 |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 | 395 |
391 const AnimationRegistrar::AnimationControllerMap& | 396 const AnimationRegistrar::AnimationControllerMap& |
392 active_animation_controllers() const { | 397 active_animation_controllers() const { |
393 return animation_registrar_->active_animation_controllers(); | 398 return animation_registrar_->active_animation_controllers(); |
394 } | 399 } |
395 | 400 |
396 LayerTreeHostImplClient* client_; | 401 LayerTreeHostImplClient* client_; |
397 Proxy* proxy_; | 402 Proxy* proxy_; |
398 | 403 |
399 private: | 404 private: |
| 405 bool DoInitializeRenderer(scoped_ptr<OutputSurface> output_surface, |
| 406 bool is_deffered_init); |
| 407 |
400 void AnimatePageScale(base::TimeTicks monotonic_time); | 408 void AnimatePageScale(base::TimeTicks monotonic_time); |
401 void AnimateScrollbars(base::TimeTicks monotonic_time); | 409 void AnimateScrollbars(base::TimeTicks monotonic_time); |
402 void AnimateTopControls(base::TimeTicks monotonic_time); | 410 void AnimateTopControls(base::TimeTicks monotonic_time); |
403 | 411 |
404 gfx::Vector2dF ScrollLayerWithViewportSpaceDelta( | 412 gfx::Vector2dF ScrollLayerWithViewportSpaceDelta( |
405 LayerImpl* layer_impl, | 413 LayerImpl* layer_impl, |
406 float scale_from_viewport_to_screen_space, | 414 float scale_from_viewport_to_screen_space, |
407 gfx::PointF viewport_point, | 415 gfx::PointF viewport_point, |
408 gfx::Vector2dF viewport_delta); | 416 gfx::Vector2dF viewport_delta); |
409 | 417 |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 scoped_ptr<AnimationRegistrar> animation_registrar_; | 531 scoped_ptr<AnimationRegistrar> animation_registrar_; |
524 | 532 |
525 RenderingStatsInstrumentation* rendering_stats_instrumentation_; | 533 RenderingStatsInstrumentation* rendering_stats_instrumentation_; |
526 | 534 |
527 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 535 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
528 }; | 536 }; |
529 | 537 |
530 } // namespace cc | 538 } // namespace cc |
531 | 539 |
532 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 540 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |