1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef SampledEffect_h
6 #define SampledEffect_h
8 #include "core/animation/Animation.h"
9 #include "core/animation/AnimationPlayer.h"
10 #include "core/animation/Interpolation.h"
11 #include "wtf/BitArray.h"
12 #include "wtf/Vector.h"
18 static PassOwnPtr<SampledEffect> create(Animation* animation, PassOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > interpolations)
20 return adoptPtr(new SampledEffect(animation, interpolations));
23 bool canChange() const;
26 const WillBeHeapVector<RefPtrWillBeMember<Interpolation> >& interpolations() const { return *m_interpolations; }
27 void setInterpolations(PassOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > interpolations) { m_interpolations = interpolations; }
29 Animation* animation() const { return m_animation; }
30 const AnimationPlayer::SortInfo& sortInfo() const { return m_playerSortInfo; }
31 Animation::Priority priority() const { return m_priority; }
33 void removeReplacedInterpolationsIfNeeded(const BitArray<numCSSProperties>&);
36 SampledEffect(Animation*, PassOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > >);
38 // When Animation and AnimationPlayer are moved to Oilpan, we won't need a
39 // handle on the player and should only keep a weak pointer to the animation.
40 RefPtr<AnimationPlayer> m_player;
41 Animation* m_animation;
42 OwnPtrWillBePersistent<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > m_interpolations;
43 AnimationPlayer::SortInfo m_playerSortInfo;
44 Animation::Priority m_priority;
47 } // namespace WebCore