| OLD | NEW |
| 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 25 matching lines...) Expand all Loading... |
| 36 #include "core/animation/AnimationPlayer.h" | 36 #include "core/animation/AnimationPlayer.h" |
| 37 #include "core/animation/SampledEffect.h" | 37 #include "core/animation/SampledEffect.h" |
| 38 #include "wtf/HashSet.h" | 38 #include "wtf/HashSet.h" |
| 39 #include "wtf/Vector.h" | 39 #include "wtf/Vector.h" |
| 40 | 40 |
| 41 namespace WebCore { | 41 namespace WebCore { |
| 42 | 42 |
| 43 class InertAnimation; | 43 class InertAnimation; |
| 44 | 44 |
| 45 class AnimationStack { | 45 class AnimationStack { |
| 46 DISALLOW_ALLOCATION(); |
| 46 WTF_MAKE_NONCOPYABLE(AnimationStack); | 47 WTF_MAKE_NONCOPYABLE(AnimationStack); |
| 47 public: | 48 public: |
| 48 AnimationStack(); | 49 AnimationStack(); |
| 49 | 50 |
| 50 void add(PassOwnPtr<SampledEffect> effect) { m_effects.append(effect); } | 51 void add(PassOwnPtrWillBeRawPtr<SampledEffect> effect) { m_effects.append(ef
fect); } |
| 51 bool isEmpty() const { return m_effects.isEmpty(); } | 52 bool isEmpty() const { return m_effects.isEmpty(); } |
| 52 bool affects(CSSPropertyID) const; | 53 bool affects(CSSPropertyID) const; |
| 53 bool hasActiveAnimationsOnCompositor(CSSPropertyID) const; | 54 bool hasActiveAnimationsOnCompositor(CSSPropertyID) const; |
| 54 static WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> >
activeInterpolations(AnimationStack*, const Vector<InertAnimation*>* newAnimatio
ns, const HashSet<const AnimationPlayer*>* cancelledAnimationPlayers, Animation:
:Priority, double timelineCurrentTime); | 55 static WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> >
activeInterpolations(AnimationStack*, const WillBeHeapVector<RawPtrWillBeMember<
InertAnimation> >* newAnimations, const WillBeHeapHashSet<RawPtrWillBeMember<con
st AnimationPlayer> >* cancelledAnimationPlayers, Animation::Priority, double ti
melineCurrentTime); |
| 56 |
| 57 void trace(Visitor*); |
| 55 | 58 |
| 56 private: | 59 private: |
| 57 void simplifyEffects(); | 60 void simplifyEffects(); |
| 58 // Effects sorted by priority. Lower priority at the start of the list. | 61 // Effects sorted by priority. Lower priority at the start of the list. |
| 59 Vector<OwnPtr<SampledEffect> > m_effects; | 62 WillBeHeapVector<OwnPtrWillBeMember<SampledEffect> > m_effects; |
| 60 | 63 |
| 61 friend class AnimationAnimationStackTest; | 64 friend class AnimationAnimationStackTest; |
| 62 }; | 65 }; |
| 63 | 66 |
| 64 } // namespace WebCore | 67 } // namespace WebCore |
| 65 | 68 |
| 66 #endif | 69 #endif |
| OLD | NEW |