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

Unified Diff: Source/core/animation/ActiveAnimations.h

Issue 225073004: Oilpan: Completely move core/animations/ to oilpan's heap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | Source/core/animation/ActiveAnimations.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/ActiveAnimations.h
diff --git a/Source/core/animation/ActiveAnimations.h b/Source/core/animation/ActiveAnimations.h
index 966f73c12ead068bfb845eff5c9a09464cfb6f54..ad5ba4b68913f437c6a62129c13848a83b480260 100644
--- a/Source/core/animation/ActiveAnimations.h
+++ b/Source/core/animation/ActiveAnimations.h
@@ -63,21 +63,27 @@ public:
CSSAnimations& cssAnimations() { return m_cssAnimations; }
const CSSAnimations& cssAnimations() const { return m_cssAnimations; }
- typedef HashMap<AnimationPlayer*, int> AnimationPlayerCountedSet;
+ typedef WillBeHeapHashMap<RawPtrWillBeWeakMember<AnimationPlayer>, int> AnimationPlayerCountedSet;
// AnimationPlayers which have animations targeting this element.
const AnimationPlayerCountedSet& players() const { return m_players; }
void addPlayer(AnimationPlayer*);
void removePlayer(AnimationPlayer*);
+#if ENABLE(OILPAN)
+ bool isEmpty() const { return m_defaultStack.isEmpty() && m_cssAnimations.isEmpty(); }
+#else
bool isEmpty() const { return m_defaultStack.isEmpty() && m_cssAnimations.isEmpty() && m_animations.isEmpty(); }
+#endif
void cancelAnimationOnCompositor();
void updateAnimationFlags(RenderStyle&);
void setAnimationStyleChange(bool animationStyleChange) { m_animationStyleChange = animationStyleChange; }
+#if !ENABLE(OILPAN)
void addAnimation(Animation* animation) { m_animations.append(animation); }
void notifyAnimationDestroyed(Animation* animation) { m_animations.remove(m_animations.find(animation)); }
+#endif
void trace(Visitor*);
@@ -89,18 +95,10 @@ private:
AnimationPlayerCountedSet m_players;
bool m_animationStyleChange;
- // This is to avoid a reference cycle that keeps Elements alive and
- // won't be needed once Element and Animation are moved to Oilpan.
+#if !ENABLE(OILPAN)
+ // FIXME: Oilpan: This is to avoid a reference cycle that keeps Elements alive
+ // and won't be needed once the Node hierarchy becomes traceable.
Vector<Animation*> m_animations;
-
-#if ENABLE(OILPAN)
- // Keep a back reference to the target Element, so that this object
- // will be finalized during the same GC sweep as the target (as the
- // Element keeps a reference in the other direction via its
- // rare data.) This is done so that we can accurately notify the
- // the Element as destroyed to the above vector of Animations in
- // the ActiveAnimations finalizer.
- Member<Element> m_target;
#endif
// CSSAnimations checks if a style change is due to animation.
« no previous file with comments | « no previous file | Source/core/animation/ActiveAnimations.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698