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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 // will also be part of the default stack, but the mapping betwen animation
name and | 64 // will also be part of the default stack, but the mapping betwen animation
name and |
65 // player is kept here. | 65 // player is kept here. |
66 CSSAnimations& cssAnimations() { return m_cssAnimations; } | 66 CSSAnimations& cssAnimations() { return m_cssAnimations; } |
67 const CSSAnimations& cssAnimations() const { return m_cssAnimations; } | 67 const CSSAnimations& cssAnimations() const { return m_cssAnimations; } |
68 | 68 |
69 // AnimationPlayers which have animations targeting this element. | 69 // AnimationPlayers which have animations targeting this element. |
70 AnimationPlayerCountedSet& players() { return m_players; } | 70 AnimationPlayerCountedSet& players() { return m_players; } |
71 | 71 |
72 bool isEmpty() const { return m_defaultStack.isEmpty() && m_cssAnimations.is
Empty() && m_players.isEmpty(); } | 72 bool isEmpty() const { return m_defaultStack.isEmpty() && m_cssAnimations.is
Empty() && m_players.isEmpty(); } |
73 | 73 |
74 void cancelAnimationOnCompositor(); | |
75 | |
76 void updateAnimationFlags(RenderStyle&); | |
77 void setAnimationStyleChange(bool animationStyleChange) { m_animationStyleCh
ange = animationStyleChange; } | 74 void setAnimationStyleChange(bool animationStyleChange) { m_animationStyleCh
ange = animationStyleChange; } |
78 | 75 |
79 void addAnimation(Animation* animation) { m_animations.append(animation); } | 76 void addAnimation(Animation* animation) { m_animations.append(animation); } |
80 void notifyAnimationDestroyed(Animation* animation) { m_animations.remove(m_
animations.find(animation)); } | 77 void notifyAnimationDestroyed(Animation* animation) { m_animations.remove(m_
animations.find(animation)); } |
81 | 78 |
82 private: | 79 private: |
83 bool isAnimationStyleChange() const { return m_animationStyleChange; } | 80 bool isAnimationStyleChange() const { return m_animationStyleChange; } |
84 | 81 |
85 AnimationStack m_defaultStack; | 82 AnimationStack m_defaultStack; |
86 CSSAnimations m_cssAnimations; | 83 CSSAnimations m_cssAnimations; |
87 AnimationPlayerCountedSet m_players; | 84 AnimationPlayerCountedSet m_players; |
88 bool m_animationStyleChange; | 85 bool m_animationStyleChange; |
89 | 86 |
90 // This is to avoid a reference cycle that keeps Elements alive. | 87 // This is to avoid a reference cycle that keeps Elements alive. |
91 Vector<Animation*> m_animations; | 88 Vector<Animation*> m_animations; |
92 | 89 |
93 // CSSAnimations checks if a style change is due to animation. | 90 // CSSAnimations checks if a style change is due to animation. |
94 friend class CSSAnimations; | 91 friend class CSSAnimations; |
95 }; | 92 }; |
96 | 93 |
97 } // namespace blink | 94 } // namespace blink |
98 | 95 |
99 #endif // SKY_ENGINE_CORE_ANIMATION_ACTIVEANIMATIONS_H_ | 96 #endif // SKY_ENGINE_CORE_ANIMATION_ACTIVEANIMATIONS_H_ |
OLD | NEW |