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

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: Correctly deal with sequences meant to start together 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
Index: ui/compositor/layer_animator.h
diff --git a/ui/compositor/layer_animator.h b/ui/compositor/layer_animator.h
index bf8ee7cfd49bb8207812786d570aff046e3d313b..25cc6781653a2286eaf84f7d05b4a8dbee193218 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.

Powered by Google App Engine
This is Rietveld 408576698