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

Unified Diff: cc/layer_animation_controller.h

Issue 11783037: Not for review: Enable accelerated animations for orphaned layers (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Wait for layout to complete before starting orphaned animations Created 7 years, 11 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 | « cc/layer.cc ('k') | cc/layer_animation_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_animation_controller.h
diff --git a/cc/layer_animation_controller.h b/cc/layer_animation_controller.h
index 786887be39e9f1881479fa896df7bc5bf300b2f5..5ffe12371cd360f8ecc063786467d7f442e33972 100644
--- a/cc/layer_animation_controller.h
+++ b/cc/layer_animation_controller.h
@@ -32,6 +32,16 @@ class CC_EXPORT LayerAnimationController
: public base::RefCounted<LayerAnimationController>,
public LayerAnimationEventObserver {
public:
+ // Controllers belonging to orphan layers begin in the
+ // NeverWaitedForLayout state. Once an animation is added to such
+ // a controller, it moves into the WaitingForLayout state, and then moves
+ // into the WaitedForLayout state after the next layout.
+ enum OrphanWaitStatus {
+ NeverWaitedForLayout = 0,
+ WaitingForLayout,
+ WaitedForLayout
+ };
+
static scoped_refptr<LayerAnimationController> create(int id);
int id() const { return m_id; }
@@ -77,10 +87,16 @@ public:
void setForceSync() { m_forceSync = true; }
void setAnimationRegistrar(AnimationRegistrar*);
+ AnimationRegistrar* animationRegistrar() { return m_registrar; }
void addObserver(LayerAnimationValueObserver*);
void removeObserver(LayerAnimationValueObserver*);
+ bool hasNonOrphanedObserver();
+
+ void setOrphanWaitStatus(OrphanWaitStatus status) { m_orphanWaitStatus = status; }
+ OrphanWaitStatus orphanWaitStatus() const { return m_orphanWaitStatus; }
+
protected:
friend class base::RefCounted<LayerAnimationController>;
@@ -123,6 +139,8 @@ private:
ObserverList<LayerAnimationValueObserver> m_observers;
+ OrphanWaitStatus m_orphanWaitStatus;
+
DISALLOW_COPY_AND_ASSIGN(LayerAnimationController);
};
« no previous file with comments | « cc/layer.cc ('k') | cc/layer_animation_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698