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 24 matching lines...) Expand all Loading... |
35 #include "core/animation/Animation.h" | 35 #include "core/animation/Animation.h" |
36 #include "core/animation/AnimationEffect.h" | 36 #include "core/animation/AnimationEffect.h" |
37 #include "core/animation/AnimationPlayer.h" | 37 #include "core/animation/AnimationPlayer.h" |
38 #include "core/animation/SampledEffect.h" | 38 #include "core/animation/SampledEffect.h" |
39 #include "platform/geometry/FloatBox.h" | 39 #include "platform/geometry/FloatBox.h" |
40 #include "wtf/HashSet.h" | 40 #include "wtf/HashSet.h" |
41 #include "wtf/Vector.h" | 41 #include "wtf/Vector.h" |
42 | 42 |
43 namespace blink { | 43 namespace blink { |
44 | 44 |
45 using ActiveInterpolationMap = WillBeHeapHashMap<PropertyHandle, RefPtrWillBeMem
ber<Interpolation>>; | 45 using ActiveInterpolationMap = HeapHashMap<PropertyHandle, Member<Interpolation>
>; |
46 | 46 |
47 class InertAnimation; | 47 class InertAnimation; |
48 | 48 |
49 class CORE_EXPORT AnimationStack { | 49 class CORE_EXPORT AnimationStack { |
50 DISALLOW_ALLOCATION(); | 50 DISALLOW_ALLOCATION(); |
51 WTF_MAKE_NONCOPYABLE(AnimationStack); | 51 WTF_MAKE_NONCOPYABLE(AnimationStack); |
52 public: | 52 public: |
53 AnimationStack(); | 53 AnimationStack(); |
54 | 54 |
55 void add(PassOwnPtrWillBeRawPtr<SampledEffect> effect) { m_effects.append(ef
fect); } | 55 void add(SampledEffect* effect) { m_effects.append(effect); } |
56 bool isEmpty() const { return m_effects.isEmpty(); } | 56 bool isEmpty() const { return m_effects.isEmpty(); } |
57 bool hasActiveAnimationsOnCompositor(CSSPropertyID) const; | 57 bool hasActiveAnimationsOnCompositor(CSSPropertyID) const; |
58 static ActiveInterpolationMap activeInterpolations(AnimationStack*, const Wi
llBeHeapVector<RawPtrWillBeMember<InertAnimation>>* newAnimations, const WillBeH
eapHashSet<RawPtrWillBeMember<const AnimationPlayer>>* suppressedAnimationPlayer
s, Animation::Priority, double timelineCurrentTime); | 58 static ActiveInterpolationMap activeInterpolations(AnimationStack*, const He
apVector<Member<InertAnimation>>* newAnimations, const WillBeHeapHashSet<RawPtrW
illBeMember<const AnimationPlayer>>* suppressedAnimationPlayers, Animation::Prio
rity, double timelineCurrentTime); |
59 | 59 |
60 bool getAnimatedBoundingBox(FloatBox&, CSSPropertyID) const; | 60 bool getAnimatedBoundingBox(FloatBox&, CSSPropertyID) const; |
61 DECLARE_TRACE(); | 61 DECLARE_TRACE(); |
62 | 62 |
63 private: | 63 private: |
64 // Effects sorted by priority. Lower priority at the start of the list. | 64 // Effects sorted by priority. Lower priority at the start of the list. |
65 WillBeHeapVector<OwnPtrWillBeMember<SampledEffect>> m_effects; | 65 HeapVector<Member<SampledEffect>> m_effects; |
66 | 66 |
67 friend class AnimationAnimationStackTest; | 67 friend class AnimationAnimationStackTest; |
68 }; | 68 }; |
69 | 69 |
70 } // namespace blink | 70 } // namespace blink |
71 | 71 |
72 #endif // AnimationStack_h | 72 #endif // AnimationStack_h |
OLD | NEW |