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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 bool contains_incomplete_tile; | 133 bool contains_incomplete_tile; |
134 | 134 |
135 // RenderPassSink implementation. | 135 // RenderPassSink implementation. |
136 virtual void AppendRenderPass(scoped_ptr<RenderPass> render_pass) OVERRIDE; | 136 virtual void AppendRenderPass(scoped_ptr<RenderPass> render_pass) OVERRIDE; |
137 }; | 137 }; |
138 | 138 |
139 virtual void BeginCommit(); | 139 virtual void BeginCommit(); |
140 virtual void CommitComplete(); | 140 virtual void CommitComplete(); |
141 virtual void Animate(base::TimeTicks monotonic_time, | 141 virtual void Animate(base::TimeTicks monotonic_time, |
142 base::Time wall_clock_time); | 142 base::Time wall_clock_time); |
| 143 virtual void UpdateAnimationState(bool start_ready_animations); |
| 144 void UpdateBackgroundAnimateTicking(bool should_background_tick); |
143 | 145 |
144 void ManageTiles(); | 146 void ManageTiles(); |
145 void SetAnticipatedDrawTime(base::TimeTicks time); | 147 void SetAnticipatedDrawTime(base::TimeTicks time); |
146 | 148 |
147 // Returns false if problems occured preparing the frame, and we should try | 149 // Returns false if problems occured preparing the frame, and we should try |
148 // to avoid displaying the frame. If PrepareToDraw is called, DidDrawAllLayers | 150 // to avoid displaying the frame. If PrepareToDraw is called, DidDrawAllLayers |
149 // must also be called, regardless of whether DrawLayers is called between the | 151 // must also be called, regardless of whether DrawLayers is called between the |
150 // two. | 152 // two. |
151 virtual bool PrepareToDraw(FrameData* frame); | 153 virtual bool PrepareToDraw(FrameData* frame); |
152 virtual void DrawLayers(FrameData* frame, base::TimeTicks frame_begin_time); | 154 virtual void DrawLayers(FrameData* frame, base::TimeTicks frame_begin_time); |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 LayerTreeHostImpl( | 351 LayerTreeHostImpl( |
350 const LayerTreeSettings& settings, | 352 const LayerTreeSettings& settings, |
351 LayerTreeHostImplClient* client, | 353 LayerTreeHostImplClient* client, |
352 Proxy* proxy, | 354 Proxy* proxy, |
353 RenderingStatsInstrumentation* rendering_stats_instrumentation); | 355 RenderingStatsInstrumentation* rendering_stats_instrumentation); |
354 void ActivatePendingTree(); | 356 void ActivatePendingTree(); |
355 | 357 |
356 // Virtual for testing. | 358 // Virtual for testing. |
357 virtual void AnimateLayers(base::TimeTicks monotonic_time, | 359 virtual void AnimateLayers(base::TimeTicks monotonic_time, |
358 base::Time wall_clock_time); | 360 base::Time wall_clock_time); |
359 virtual void UpdateAnimationState(); | |
360 | 361 |
361 // Virtual for testing. | 362 // Virtual for testing. |
362 virtual base::TimeDelta LowFrequencyAnimationInterval() const; | 363 virtual base::TimeDelta LowFrequencyAnimationInterval() const; |
363 | 364 |
364 const AnimationRegistrar::AnimationControllerMap& | 365 const AnimationRegistrar::AnimationControllerMap& |
365 active_animation_controllers() const { | 366 active_animation_controllers() const { |
366 return animation_registrar_->active_animation_controllers(); | 367 return animation_registrar_->active_animation_controllers(); |
367 } | 368 } |
368 | 369 |
369 LayerTreeHostImplClient* client_; | 370 LayerTreeHostImplClient* client_; |
(...skipping 12 matching lines...) Expand all Loading... |
382 | 383 |
383 void UpdateMaxScrollOffset(); | 384 void UpdateMaxScrollOffset(); |
384 void TrackDamageForAllSurfaces( | 385 void TrackDamageForAllSurfaces( |
385 LayerImpl* root_draw_layer, | 386 LayerImpl* root_draw_layer, |
386 const LayerImplList& render_surface_layer_list); | 387 const LayerImplList& render_surface_layer_list); |
387 | 388 |
388 // Returns false if the frame should not be displayed. This function should | 389 // Returns false if the frame should not be displayed. This function should |
389 // only be called from PrepareToDraw, as DidDrawAllLayers must be called | 390 // only be called from PrepareToDraw, as DidDrawAllLayers must be called |
390 // if this helper function is called. | 391 // if this helper function is called. |
391 bool CalculateRenderPasses(FrameData* frame); | 392 bool CalculateRenderPasses(FrameData* frame); |
392 void SetBackgroundTickingEnabled(bool enabled); | |
393 | 393 |
394 void SendDidLoseOutputSurfaceRecursive(LayerImpl* current); | 394 void SendDidLoseOutputSurfaceRecursive(LayerImpl* current); |
395 void ClearRenderSurfaces(); | 395 void ClearRenderSurfaces(); |
396 bool EnsureRenderSurfaceLayerList(); | 396 bool EnsureRenderSurfaceLayerList(); |
397 void ClearCurrentlyScrollingLayer(); | 397 void ClearCurrentlyScrollingLayer(); |
398 | 398 |
399 void AnimateScrollbarsRecursive(LayerImpl* layer, | 399 void AnimateScrollbarsRecursive(LayerImpl* layer, |
400 base::TimeTicks time); | 400 base::TimeTicks time); |
401 | 401 |
402 void DumpRenderSurfaces(std::string* str, | 402 void DumpRenderSurfaces(std::string* str, |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 scoped_ptr<AnimationRegistrar> animation_registrar_; | 467 scoped_ptr<AnimationRegistrar> animation_registrar_; |
468 | 468 |
469 RenderingStatsInstrumentation* rendering_stats_instrumentation_; | 469 RenderingStatsInstrumentation* rendering_stats_instrumentation_; |
470 | 470 |
471 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 471 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
472 }; | 472 }; |
473 | 473 |
474 } // namespace cc | 474 } // namespace cc |
475 | 475 |
476 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 476 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |