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

Unified Diff: ui/gfx/compositor/layer_animation_preemption_strategy.h

Issue 8247009: Explicit animation support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated views desktop demo. Created 9 years, 2 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
Index: ui/gfx/compositor/layer_animation_preemption_strategy.h
diff --git a/ui/gfx/compositor/layer_animation_preemption_strategy.h b/ui/gfx/compositor/layer_animation_preemption_strategy.h
new file mode 100644
index 0000000000000000000000000000000000000000..0fd68568c0fa2f1dfbb11b6df6e315b9b5beb150
--- /dev/null
+++ b/ui/gfx/compositor/layer_animation_preemption_strategy.h
@@ -0,0 +1,37 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_GFX_COMPOSITOR_LAYER_ANIMATION_PREEMPTION_STRATEGY_H_
+#define UI_GFX_COMPOSITOR_LAYER_ANIMATION_PREEMPTION_STRATEGY_H_
+
+#include "ui/gfx/compositor/compositor_export.h"
+#include "ui/gfx/compositor/layer_animator.h"
+
+namespace ui {
+
+class LayerAnimationDelegate;
+class LayerAnimationSequence;
+
+class COMPOSITOR_EXPORT LayerAnimationPreemptionStrategy {
sky 2011/10/14 16:39:52 This seems better served by an enum. Is there a re
+ public:
+ // Do not delete these objects, they are singletons.
+ static LayerAnimationPreemptionStrategy* GetImmediatelySetNewTarget();
+ static LayerAnimationPreemptionStrategy* GetImmediatelyAnimateToNewTarget();
+ static LayerAnimationPreemptionStrategy* GetEnqueueNewAnimation();
+ static LayerAnimationPreemptionStrategy* GetBlendCurrentWithNewAnimation();
+
+ // Start the sequence |preempting|, modifying the queue and running animations
+ // as necessary.
+ virtual void Preempt(LayerAnimationDelegate* delegate,
+ LayerAnimationSequence* preempting,
+ LayerAnimator::RunningAnimations* running,
+ LayerAnimator::AnimationQueue* queue) = 0;
+
+ protected:
+ virtual ~LayerAnimationPreemptionStrategy() {}
+};
+
+} // namespace ui
+
+#endif // UI_GFX_COMPOSITOR_LAYER_ANIMATION_PREEMPTION_STRATEGY_H_

Powered by Google App Engine
This is Rietveld 408576698