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

Unified Diff: Source/core/animation/css/CSSAnimations.h

Issue 204743002: Oilpan: Move AnimatableValue's hierarchy to oilpan's heap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/animation/css/CSSAnimations.h
diff --git a/Source/core/animation/css/CSSAnimations.h b/Source/core/animation/css/CSSAnimations.h
index e730fc11a58179663f6765d0d5787533ba33040b..0e4214bb3cdf21bb7b389557ab441a4b6e2a7fe4 100644
--- a/Source/core/animation/css/CSSAnimations.h
+++ b/Source/core/animation/css/CSSAnimations.h
@@ -78,8 +78,8 @@ public:
{
NewTransition newTransition;
newTransition.id = id;
- newTransition.from = from;
- newTransition.to = to;
+ newTransition.from = const_cast<AnimatableValue*>(from);
+ newTransition.to = const_cast<AnimatableValue*>(to);
newTransition.animation = animation;
m_newTransitions.set(id, newTransition);
}
@@ -96,12 +96,20 @@ public:
const Vector<AtomicString>& animationsWithPauseToggled() const { return m_animationsWithPauseToggled; }
struct NewTransition {
+ ALLOW_ONLY_INLINE_ALLOCATION();
+ public:
+ void trace(Visitor* visitor)
+ {
+ visitor->trace(from);
+ visitor->trace(to);
+ }
+
CSSPropertyID id;
- const AnimatableValue* from;
- const AnimatableValue* to;
+ RawPtrWillBeMember<AnimatableValue> from;
Mads Ager (chromium) 2014/03/21 17:05:44 Do you want to keep the const here and use RawPtrW
haraken 2014/03/21 17:21:33 Done.
+ RawPtrWillBeMember<AnimatableValue> to;
RefPtr<InertAnimation> animation;
};
- typedef HashMap<CSSPropertyID, NewTransition> NewTransitionMap;
+ typedef WillBePersistentHeapHashMap<CSSPropertyID, NewTransition> NewTransitionMap;
const NewTransitionMap& newTransitions() const { return m_newTransitions; }
const HashSet<CSSPropertyID>& cancelledTransitions() const { return m_cancelledTransitions; }
@@ -164,11 +172,19 @@ private:
// ParGroup to drive multiple animations from a single AnimationPlayer.
typedef HashMap<AtomicString, HashSet<RefPtr<AnimationPlayer> > > AnimationMap;
struct RunningTransition {
+ ALLOW_ONLY_INLINE_ALLOCATION();
+ public:
+ void trace(Visitor* visitor)
+ {
+ visitor->trace(from);
+ visitor->trace(to);
+ }
+
Animation* transition; // The TransitionTimeline keeps the AnimationPlayers alive
- const AnimatableValue* from;
- const AnimatableValue* to;
+ RawPtrWillBeMember<AnimatableValue> from;
+ RawPtrWillBeMember<AnimatableValue> to;
};
- typedef HashMap<CSSPropertyID, RunningTransition > TransitionMap;
+ typedef WillBePersistentHeapHashMap<CSSPropertyID, RunningTransition> TransitionMap;
AnimationMap m_animations;
TransitionMap m_transitions;
OwnPtr<CSSAnimationUpdate> m_pendingUpdate;

Powered by Google App Engine
This is Rietveld 408576698