2011-05-12 Simon Fraser <simon.fraser@apple.com>

        Followup to r86351; give the vectors some inline capacity
        to avoid heap allocations in most cases.

        * page/animation/AnimationBase.cpp:
        (WebCore::PropertyWrapperShadow::blendMismatchedShadowLists):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86353 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 234a1acd
2011-05-12 Simon Fraser <simon.fraser@apple.com>
Followup to r86351; give the vectors some inline capacity
to avoid heap allocations in most cases.
* page/animation/AnimationBase.cpp:
(WebCore::PropertyWrapperShadow::blendMismatchedShadowLists):
2011-05-12 Simon Fraser <simon.fraser@apple.com>
Reviewed by Dan Bernstein.
......@@ -430,13 +430,13 @@ private:
{
// The shadows in ShadowData are stored in reverse order, so when animating mismatched lists,
// reverse them and match from the end.
Vector<const ShadowData*> fromShadows(fromLength);
Vector<const ShadowData*, 4> fromShadows(fromLength);
for (int i = fromLength - 1; i >= 0; --i) {
fromShadows[i] = shadowA;
shadowA = shadowA->next();
}
Vector<const ShadowData*> toShadows(toLength);
Vector<const ShadowData*, 4> toShadows(toLength);
for (int i = toLength - 1; i >= 0; --i) {
toShadows[i] = shadowB;
shadowB = shadowB->next();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment