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

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: Gardening 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
« no previous file with comments | « ui/gfx/compositor/compositor.gyp ('k') | ui/gfx/compositor/screen_rotation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/compositor/layer_animator.cc
diff --git a/ui/gfx/compositor/layer_animator.cc b/ui/gfx/compositor/layer_animator.cc
index 7bc96983e5849249dc38fe64ff9f9aa7d8858154..588231c61301d2bdf4a1e525a2f181f04e290911 100644
--- a/ui/gfx/compositor/layer_animator.cc
+++ b/ui/gfx/compositor/layer_animator.cc
@@ -304,8 +304,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()) {
« no previous file with comments | « ui/gfx/compositor/compositor.gyp ('k') | ui/gfx/compositor/screen_rotation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698