Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Side by Side Diff: cc/trees/layer_tree_host_impl.h

Issue 13613003: cc: Make animations tick regardless of drawing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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();
144 void UpdateBackgroundAnimateTicking();
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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 LayerTreeHostImpl( 350 LayerTreeHostImpl(
349 const LayerTreeSettings& settings, 351 const LayerTreeSettings& settings,
350 LayerTreeHostImplClient* client, 352 LayerTreeHostImplClient* client,
351 Proxy* proxy, 353 Proxy* proxy,
352 RenderingStatsInstrumentation* rendering_stats_instrumentation); 354 RenderingStatsInstrumentation* rendering_stats_instrumentation);
353 void ActivatePendingTree(); 355 void ActivatePendingTree();
354 356
355 // Virtual for testing. 357 // Virtual for testing.
356 virtual void AnimateLayers(base::TimeTicks monotonic_time, 358 virtual void AnimateLayers(base::TimeTicks monotonic_time,
357 base::Time wall_clock_time); 359 base::Time wall_clock_time);
358 virtual void UpdateAnimationState();
359 360
360 // Virtual for testing. 361 // Virtual for testing.
361 virtual base::TimeDelta LowFrequencyAnimationInterval() const; 362 virtual base::TimeDelta LowFrequencyAnimationInterval() const;
362 363
363 const AnimationRegistrar::AnimationControllerMap& 364 const AnimationRegistrar::AnimationControllerMap&
364 active_animation_controllers() const { 365 active_animation_controllers() const {
365 return animation_registrar_->active_animation_controllers(); 366 return animation_registrar_->active_animation_controllers();
366 } 367 }
367 368
368 LayerTreeHostImplClient* client_; 369 LayerTreeHostImplClient* client_;
(...skipping 12 matching lines...) Expand all
381 382
382 void UpdateMaxScrollOffset(); 383 void UpdateMaxScrollOffset();
383 void TrackDamageForAllSurfaces( 384 void TrackDamageForAllSurfaces(
384 LayerImpl* root_draw_layer, 385 LayerImpl* root_draw_layer,
385 const LayerImplList& render_surface_layer_list); 386 const LayerImplList& render_surface_layer_list);
386 387
387 // Returns false if the frame should not be displayed. This function should 388 // Returns false if the frame should not be displayed. This function should
388 // only be called from PrepareToDraw, as DidDrawAllLayers must be called 389 // only be called from PrepareToDraw, as DidDrawAllLayers must be called
389 // if this helper function is called. 390 // if this helper function is called.
390 bool CalculateRenderPasses(FrameData* frame); 391 bool CalculateRenderPasses(FrameData* frame);
391 void SetBackgroundTickingEnabled(bool enabled);
392 392
393 void SendDidLoseOutputSurfaceRecursive(LayerImpl* current); 393 void SendDidLoseOutputSurfaceRecursive(LayerImpl* current);
394 void ClearRenderSurfaces(); 394 void ClearRenderSurfaces();
395 bool EnsureRenderSurfaceLayerList(); 395 bool EnsureRenderSurfaceLayerList();
396 void ClearCurrentlyScrollingLayer(); 396 void ClearCurrentlyScrollingLayer();
397 397
398 void AnimateScrollbarsRecursive(LayerImpl* layer, 398 void AnimateScrollbarsRecursive(LayerImpl* layer,
399 base::TimeTicks time); 399 base::TimeTicks time);
400 400
401 void DumpRenderSurfaces(std::string* str, 401 void DumpRenderSurfaces(std::string* str,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 scoped_ptr<AnimationRegistrar> animation_registrar_; 466 scoped_ptr<AnimationRegistrar> animation_registrar_;
467 467
468 RenderingStatsInstrumentation* rendering_stats_instrumentation_; 468 RenderingStatsInstrumentation* rendering_stats_instrumentation_;
469 469
470 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 470 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
471 }; 471 };
472 472
473 } // namespace cc 473 } // namespace cc
474 474
475 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 475 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698