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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
196 virtual CompositorFrameMetadata MakeCompositorFrameMetadata() const OVERRIDE; | 199 virtual CompositorFrameMetadata MakeCompositorFrameMetadata() const OVERRIDE; |
197 virtual bool AllowPartialSwap() const OVERRIDE; | 200 virtual bool AllowPartialSwap() const OVERRIDE; |
198 | 201 |
199 // TileManagerClient implementation. | 202 // TileManagerClient implementation. |
200 virtual void ScheduleManageTiles() OVERRIDE; | 203 virtual void ScheduleManageTiles() OVERRIDE; |
201 virtual void DidInitializeVisibleTile() OVERRIDE; | 204 virtual void DidInitializeVisibleTile() OVERRIDE; |
202 virtual bool ShouldForceTileUploadsRequiredForActivationToComplete() const | 205 virtual bool ShouldForceTileUploadsRequiredForActivationToComplete() const |
203 OVERRIDE; | 206 OVERRIDE; |
204 | 207 |
205 // OutputSurfaceClient implementation. | 208 // OutputSurfaceClient implementation. |
209 virtual bool InitializeForGL( | |
210 scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE; | |
206 virtual void SetNeedsRedrawRect(gfx::Rect rect) OVERRIDE; | 211 virtual void SetNeedsRedrawRect(gfx::Rect rect) OVERRIDE; |
207 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, | 212 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, |
208 base::TimeDelta interval) OVERRIDE; | 213 base::TimeDelta interval) OVERRIDE; |
209 virtual void BeginFrame(base::TimeTicks frame_time) | 214 virtual void BeginFrame(base::TimeTicks frame_time) |
210 OVERRIDE; | 215 OVERRIDE; |
211 virtual void OnSendFrameToParentCompositorAck(const CompositorFrameAck& ack) | 216 virtual void OnSendFrameToParentCompositorAck(const CompositorFrameAck& ack) |
212 OVERRIDE; | 217 OVERRIDE; |
213 | 218 |
214 // Called from LayerTreeImpl. | 219 // Called from LayerTreeImpl. |
215 void OnCanDrawStateChangedForTree(); | 220 void OnCanDrawStateChangedForTree(); |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
389 | 394 |
390 const AnimationRegistrar::AnimationControllerMap& | 395 const AnimationRegistrar::AnimationControllerMap& |
391 active_animation_controllers() const { | 396 active_animation_controllers() const { |
392 return animation_registrar_->active_animation_controllers(); | 397 return animation_registrar_->active_animation_controllers(); |
393 } | 398 } |
394 | 399 |
395 LayerTreeHostImplClient* client_; | 400 LayerTreeHostImplClient* client_; |
396 Proxy* proxy_; | 401 Proxy* proxy_; |
397 | 402 |
398 private: | 403 private: |
404 bool DoInitializeRenderer(scoped_ptr<OutputSurface> output_surface, | |
405 bool is_deffered_init); | |
piman
2013/05/28 23:35:34
nit: spelling and no abbreviation (is_deferred_ini
| |
406 | |
399 void AnimatePageScale(base::TimeTicks monotonic_time); | 407 void AnimatePageScale(base::TimeTicks monotonic_time); |
400 void AnimateScrollbars(base::TimeTicks monotonic_time); | 408 void AnimateScrollbars(base::TimeTicks monotonic_time); |
401 void AnimateTopControls(base::TimeTicks monotonic_time); | 409 void AnimateTopControls(base::TimeTicks monotonic_time); |
402 | 410 |
403 gfx::Vector2dF ScrollLayerWithViewportSpaceDelta( | 411 gfx::Vector2dF ScrollLayerWithViewportSpaceDelta( |
404 LayerImpl* layer_impl, | 412 LayerImpl* layer_impl, |
405 float scale_from_viewport_to_screen_space, | 413 float scale_from_viewport_to_screen_space, |
406 gfx::PointF viewport_point, | 414 gfx::PointF viewport_point, |
407 gfx::Vector2dF viewport_delta); | 415 gfx::Vector2dF viewport_delta); |
408 | 416 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
505 scoped_ptr<AnimationRegistrar> animation_registrar_; | 513 scoped_ptr<AnimationRegistrar> animation_registrar_; |
506 | 514 |
507 RenderingStatsInstrumentation* rendering_stats_instrumentation_; | 515 RenderingStatsInstrumentation* rendering_stats_instrumentation_; |
508 | 516 |
509 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 517 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
510 }; | 518 }; |
511 | 519 |
512 } // namespace cc | 520 } // namespace cc |
513 | 521 |
514 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 522 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |