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

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

Issue 732153003: Update a result vector when sampling animation effects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « Source/core/animation/AnimationEffect.h ('k') | Source/core/animation/InertAnimation.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 bool compareEffects(const OwnPtrWillBeMember<SampledEffect>& effect1, const OwnP trWillBeMember<SampledEffect>& effect2) 53 bool compareEffects(const OwnPtrWillBeMember<SampledEffect>& effect1, const OwnP trWillBeMember<SampledEffect>& effect2)
54 { 54 {
55 ASSERT(effect1 && effect2); 55 ASSERT(effect1 && effect2);
56 return effect1->sequenceNumber() < effect2->sequenceNumber(); 56 return effect1->sequenceNumber() < effect2->sequenceNumber();
57 } 57 }
58 58
59 void copyNewAnimationsToActiveInterpolationMap(const WillBeHeapVector<RawPtrWill BeMember<InertAnimation> >& newAnimations, WillBeHeapHashMap<CSSPropertyID, RefP trWillBeMember<Interpolation> >& result) 59 void copyNewAnimationsToActiveInterpolationMap(const WillBeHeapVector<RawPtrWill BeMember<InertAnimation> >& newAnimations, WillBeHeapHashMap<CSSPropertyID, RefP trWillBeMember<Interpolation> >& result)
60 { 60 {
61 for (size_t i = 0; i < newAnimations.size(); ++i) { 61 for (size_t i = 0; i < newAnimations.size(); ++i) {
62 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > sample = newAnimations[i]->sample(0); 62 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> sample = nullptr;
63 if (sample) { 63 newAnimations[i]->sample(0, sample);
64 if (sample)
64 copyToActiveInterpolationMap(*sample, result); 65 copyToActiveInterpolationMap(*sample, result);
65 }
66 } 66 }
67 } 67 }
68 68
69 } // namespace 69 } // namespace
70 70
71 AnimationStack::AnimationStack() 71 AnimationStack::AnimationStack()
72 { 72 {
73 } 73 }
74 74
75 bool AnimationStack::affects(CSSPropertyID property) const 75 bool AnimationStack::affects(CSSPropertyID property) const
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 FloatBox expandingBox(originalBox); 161 FloatBox expandingBox(originalBox);
162 if (!CompositorAnimations::instance()->getAnimatedBoundingBox(expand ingBox, *anim->effect(), startRange, endRange)) 162 if (!CompositorAnimations::instance()->getAnimatedBoundingBox(expand ingBox, *anim->effect(), startRange, endRange))
163 return false; 163 return false;
164 box.expandTo(expandingBox); 164 box.expandTo(expandingBox);
165 } 165 }
166 } 166 }
167 return true; 167 return true;
168 } 168 }
169 169
170 } // namespace blink 170 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/animation/AnimationEffect.h ('k') | Source/core/animation/InertAnimation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698