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

Side by Side Diff: Source/core/animation/AnimationStack.cpp

Issue 399033002: Web Animations: Don't compare start time for AnimationPlayer sorting (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 5 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 if (animationStack) { 99 if (animationStack) {
100 WillBeHeapVector<OwnPtrWillBeMember<SampledEffect> >& effects = animatio nStack->m_effects; 100 WillBeHeapVector<OwnPtrWillBeMember<SampledEffect> >& effects = animatio nStack->m_effects;
101 // std::sort doesn't work with OwnPtrs 101 // std::sort doesn't work with OwnPtrs
102 nonCopyingSort(effects.begin(), effects.end(), compareEffects); 102 nonCopyingSort(effects.begin(), effects.end(), compareEffects);
103 animationStack->simplifyEffects(); 103 animationStack->simplifyEffects();
104 for (size_t i = 0; i < effects.size(); ++i) { 104 for (size_t i = 0; i < effects.size(); ++i) {
105 const SampledEffect& effect = *effects[i]; 105 const SampledEffect& effect = *effects[i];
106 if (effect.priority() != priority || (cancelledAnimationPlayers && e ffect.animation() && cancelledAnimationPlayers->contains(effect.animation()->pla yer()))) 106 if (effect.priority() != priority || (cancelledAnimationPlayers && e ffect.animation() && cancelledAnimationPlayers->contains(effect.animation()->pla yer())))
107 continue; 107 continue;
108 if (newAnimations && effect.sortInfo().startTime() > timelineCurrent Time) {
109 copyNewAnimationsToActiveInterpolationMap(*newAnimations, result );
110 newAnimations = 0;
111 }
112 copyToActiveInterpolationMap(effect.interpolations(), result); 108 copyToActiveInterpolationMap(effect.interpolations(), result);
113 } 109 }
114 } 110 }
115 111
116 if (newAnimations) 112 if (newAnimations)
117 copyNewAnimationsToActiveInterpolationMap(*newAnimations, result); 113 copyNewAnimationsToActiveInterpolationMap(*newAnimations, result);
118 114
119 return result; 115 return result;
120 } 116 }
121 117
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 FloatBox expandingBox(originalBox); 161 FloatBox expandingBox(originalBox);
166 if (!CompositorAnimations::instance()->getAnimatedBoundingBox(expand ingBox, *anim->effect(), startRange, endRange)) 162 if (!CompositorAnimations::instance()->getAnimatedBoundingBox(expand ingBox, *anim->effect(), startRange, endRange))
167 return false; 163 return false;
168 box.expandTo(expandingBox); 164 box.expandTo(expandingBox);
169 } 165 }
170 } 166 }
171 return true; 167 return true;
172 } 168 }
173 169
174 } // namespace blink 170 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/animation/AnimationPlayerTest.cpp ('k') | Source/core/animation/AnimationStackTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698