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

Side by Side Diff: Source/core/animation/ActiveAnimations.h

Issue 212143002: Oilpan: Move CSSAnimations, CSSAnimationUpdate and ActiveAnimations 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 class CSSAnimations; 43 class CSSAnimations;
44 class RenderObject; 44 class RenderObject;
45 class Element; 45 class Element;
46 46
47 // FIXME: Move these to CompositorAnimations 47 // FIXME: Move these to CompositorAnimations
48 bool shouldCompositeForActiveAnimations(const RenderObject&); 48 bool shouldCompositeForActiveAnimations(const RenderObject&);
49 bool hasActiveAnimations(const RenderObject&, CSSPropertyID); 49 bool hasActiveAnimations(const RenderObject&, CSSPropertyID);
50 bool hasActiveAnimationsOnCompositor(const RenderObject&, CSSPropertyID); 50 bool hasActiveAnimationsOnCompositor(const RenderObject&, CSSPropertyID);
51 51
52 class ActiveAnimations { 52 class ActiveAnimations : public NoBaseWillBeGarbageCollectedFinalized<ActiveAnim ations> {
53 public: 53 public:
54 ActiveAnimations() 54 ActiveAnimations()
55 : m_animationStyleChange(false) { } 55 : m_animationStyleChange(false)
56 {
57 }
56 58
57 // Animations that are currently active for this element, their effects will be applied 59 // Animations that are currently active for this element, their effects will be applied
58 // during a style recalc. CSS Transitions are included in this stack. 60 // during a style recalc. CSS Transitions are included in this stack.
59 AnimationStack& defaultStack() { return m_defaultStack; } 61 AnimationStack& defaultStack() { return m_defaultStack; }
60 // Tracks the state of active CSS Animations and Transitions. The individual animations 62 // Tracks the state of active CSS Animations and Transitions. The individual animations
61 // will also be part of the default stack, but the mapping betwen animation name and 63 // will also be part of the default stack, but the mapping betwen animation name and
62 // player is kept here. 64 // player is kept here.
63 CSSAnimations& cssAnimations() { return m_cssAnimations; } 65 CSSAnimations& cssAnimations() { return m_cssAnimations; }
64 const CSSAnimations& cssAnimations() const { return m_cssAnimations; } 66 const CSSAnimations& cssAnimations() const { return m_cssAnimations; }
65 67
66 typedef HashCountedSet<AnimationPlayer*> AnimationPlayerSet; 68 typedef HashCountedSet<AnimationPlayer*> AnimationPlayerSet;
haraken 2014/03/26 06:20:52 This raw pointer is safe because the lifetime of t
67 // AnimationPlayers which have animations targeting this element. 69 // AnimationPlayers which have animations targeting this element.
68 const AnimationPlayerSet& players() const { return m_players; } 70 const AnimationPlayerSet& players() const { return m_players; }
69 AnimationPlayerSet& players() { return m_players; } 71 AnimationPlayerSet& players() { return m_players; }
70 72
71 bool isEmpty() const { return m_defaultStack.isEmpty() && m_cssAnimations.is Empty(); } 73 bool isEmpty() const { return m_defaultStack.isEmpty() && m_cssAnimations.is Empty(); }
72 74
73 // FIXME: This and most of this class needs to be renamed to consider 'curre nt' 75 // FIXME: This and most of this class needs to be renamed to consider 'curre nt'
74 // rather than 'active' animations. 76 // rather than 'active' animations.
75 bool hasActiveAnimations(CSSPropertyID) const; 77 bool hasActiveAnimations(CSSPropertyID) const;
76 bool hasActiveAnimationsOnCompositor(CSSPropertyID) const; 78 bool hasActiveAnimationsOnCompositor(CSSPropertyID) const;
77 void cancelAnimationOnCompositor(); 79 void cancelAnimationOnCompositor();
78 80
79 void setAnimationStyleChange(bool animationStyleChange) { m_animationStyleCh ange = animationStyleChange; } 81 void setAnimationStyleChange(bool animationStyleChange) { m_animationStyleCh ange = animationStyleChange; }
80 82
83 void trace(Visitor*);
84
81 private: 85 private:
82 bool isAnimationStyleChange() const { return m_animationStyleChange; } 86 bool isAnimationStyleChange() const { return m_animationStyleChange; }
83 87
84 AnimationStack m_defaultStack; 88 AnimationStack m_defaultStack;
85 CSSAnimations m_cssAnimations; 89 CSSAnimations m_cssAnimations;
86 AnimationPlayerSet m_players; 90 AnimationPlayerSet m_players;
87 bool m_animationStyleChange; 91 bool m_animationStyleChange;
88 92
89 // CSSAnimations checks if a style change is due to animation. 93 // CSSAnimations checks if a style change is due to animation.
90 friend class CSSAnimations; 94 friend class CSSAnimations;
91 }; 95 };
92 96
93 } // namespace WebCore 97 } // namespace WebCore
94 98
95 #endif 99 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/animation/ActiveAnimations.cpp » ('j') | Source/core/animation/css/CSSAnimations.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698