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

Unified Diff: ui/gfx/compositor/layer_animator.cc

Issue 8402002: Reenable triggering of screen rotations by sensors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 9 years, 1 month 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_animator.cc
diff --git a/ui/gfx/compositor/layer_animator.cc b/ui/gfx/compositor/layer_animator.cc
index 1ec2b78ee0bb02ff6a95307d11244b3bf0544c0a..daa59c1b7d3bb7d95a9914a65242ad4be9dde798 100644
--- a/ui/gfx/compositor/layer_animator.cc
+++ b/ui/gfx/compositor/layer_animator.cc
@@ -299,8 +299,9 @@ void LayerAnimator::FinishAnimation(LayerAnimationSequence* sequence) {
}
void LayerAnimator::FinishAnyAnimationWithZeroDuration() {
- // We need to make a copy because Progress may indirectly cause new animations
- // to start running.
+ // Special case: if we've started a 0 duration animation, just finish it now
+ // and get rid of it. We need to make a copy because Progress may indirectly
+ // cause new animations to start running.
RunningAnimations running_animations_copy = running_animations_;
for (size_t i = 0; i < running_animations_copy.size(); ++i) {
if (running_animations_copy[i].sequence->duration() == base::TimeDelta()) {

Powered by Google App Engine
This is Rietveld 408576698