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

Unified Diff: ui/compositor/layer.h

Issue 291843012: compositor: Tick the UI animations from cc, instead of from timer callbacks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/compositor/compositor.gyp ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer.h
diff --git a/ui/compositor/layer.h b/ui/compositor/layer.h
index 2b0d9138361dd46eabb0dbe199716c63c2256f3e..069f1671cf4f2b5ffcfbc251fc646d3b007154e3 100644
--- a/ui/compositor/layer.h
+++ b/ui/compositor/layer.h
@@ -287,6 +287,8 @@ class COMPOSITOR_EXPORT Layer
const SkRegion& damaged_region() const { return damaged_region_; }
+ void CompleteAllAnimations();
+
// Suppresses painting the content by disconnecting |delegate_|.
void SuppressPaint();
@@ -338,6 +340,8 @@ class COMPOSITOR_EXPORT Layer
private:
friend class LayerOwner;
+ void CollectAnimators(std::vector<scoped_refptr<LayerAnimator> >* animators);
+
// Stacks |child| above or below |other|. Helper method for StackAbove() and
// StackBelow().
void StackRelativeTo(Layer* child, Layer* other, bool above);
@@ -366,6 +370,7 @@ class COMPOSITOR_EXPORT Layer
virtual void AddThreadedAnimation(
scoped_ptr<cc::Animation> animation) OVERRIDE;
virtual void RemoveThreadedAnimation(int animation_id) OVERRIDE;
+ virtual LayerAnimatorCollection* GetLayerAnimatorCollection() OVERRIDE;
// Creates a corresponding composited layer for |type_|.
void CreateWebLayer();
@@ -389,6 +394,12 @@ class COMPOSITOR_EXPORT Layer
// be called once we have been added to a tree.
void SendPendingThreadedAnimations();
+ void AddAnimatorsInTreeToCollection(LayerAnimatorCollection* collection);
+ void RemoveAnimatorsInTreeFromCollection(LayerAnimatorCollection* collection);
+
+ // Returns whether the layer has an animating LayerAnimator.
+ bool IsAnimating() const;
+
const LayerType type_;
Compositor* compositor_;
« no previous file with comments | « ui/compositor/compositor.gyp ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698