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

Unified Diff: ui/compositor/layer_animator.h

Issue 11896017: Thread ui opacity animations (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix ash_unittests Created 7 years, 10 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/layer_animation_sequence_unittest.cc ('k') | ui/compositor/layer_animator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer_animator.h
diff --git a/ui/compositor/layer_animator.h b/ui/compositor/layer_animator.h
index bf8ee7cfd49bb8207812786d570aff046e3d313b..27cb9db82350bc6a91e995c6279e022938fa6137 100644
--- a/ui/compositor/layer_animator.h
+++ b/ui/compositor/layer_animator.h
@@ -113,14 +113,20 @@ class COMPOSITOR_EXPORT LayerAnimator
// of this animation sequence.
void ScheduleAnimation(LayerAnimationSequence* animation);
- // Starts the animations to be run together. Obviously will not work if
- // they animate any common properties. The animator takes ownership of the
+ // Starts the animations to be run together, ensuring that the first elements
+ // in these sequences have the same effective start time even when some of
+ // them start on the compositor thread (but there is no such guarantee for
+ // the effective start time of subsequent elements). Obviously will not work
+ // if they animate any common properties. The animator takes ownership of the
// animation sequences. Takes PreemptionStrategy into account.
void StartTogether(const std::vector<LayerAnimationSequence*>& animations);
- // Schedules the animations to be run together. Obviously will not work if
- // they animate any common properties. The animator takes ownership of the
- // animation sequences.
+ // Schedules the animations to be run together, ensuring that the first
+ // elements in these sequences have the same effective start time even when
+ // some of them start on the compositor thread (but there is no such guarantee
+ // for the effective start time of subsequent elements). Obviously will not
+ // work if they animate any common properties. The animator takes ownership
+ // of the animation sequences.
void ScheduleTogether(const std::vector<LayerAnimationSequence*>& animations);
// Schedules a pause for length |duration| of all the specified properties.
@@ -159,6 +165,9 @@ class COMPOSITOR_EXPORT LayerAnimator
void AddObserver(LayerAnimationObserver* observer);
void RemoveObserver(LayerAnimationObserver* observer);
+ // Called when a threaded animation is actually started.
+ void OnThreadedAnimationStarted(const cc::AnimationEvent& event);
+
// This determines how implicit animations will be tweened. This has no
// effect on animations that are explicitly started or scheduled. The default
// is Tween::LINEAR.
@@ -216,6 +225,7 @@ class COMPOSITOR_EXPORT LayerAnimator
private:
friend class base::RefCounted<LayerAnimator>;
friend class ScopedLayerAnimationSettings;
+ friend class LayerAnimatorTestController;
class RunningAnimation {
public:
« no previous file with comments | « ui/compositor/layer_animation_sequence_unittest.cc ('k') | ui/compositor/layer_animator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698