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

Unified Diff: Source/core/animation/AnimationTimeline.cpp

Issue 353083002: AnimationTimeline::serviceAnimations should reserveInitialCapacity (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/AnimationTimeline.cpp
diff --git a/Source/core/animation/AnimationTimeline.cpp b/Source/core/animation/AnimationTimeline.cpp
index be23aa7e6369c12f049e7af1c3a1548e2a562420..763895aab03ba26eeb29efe6bda9ac4e77be0ad9 100644
--- a/Source/core/animation/AnimationTimeline.cpp
+++ b/Source/core/animation/AnimationTimeline.cpp
@@ -100,7 +100,9 @@ void AnimationTimeline::serviceAnimations(TimingUpdateReason reason)
m_timing->cancelWake();
double timeToNextEffect = std::numeric_limits<double>::infinity();
+
WillBeHeapVector<RawPtrWillBeMember<AnimationPlayer> > players;
+ players.reserveInitialCapacity(m_playersNeedingUpdate.size());
for (WillBeHeapHashSet<RefPtrWillBeMember<AnimationPlayer> >::iterator it = m_playersNeedingUpdate.begin(); it != m_playersNeedingUpdate.end(); ++it)
players.append(it->get());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698