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

Side by Side Diff: Source/core/animation/Animation.cpp

Issue 425903003: Use HeapHashCountedSet for AnimationPlayerCountedSet (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 { 105 {
106 #if !ENABLE(OILPAN) 106 #if !ENABLE(OILPAN)
107 if (m_target) 107 if (m_target)
108 m_target->activeAnimations()->notifyAnimationDestroyed(this); 108 m_target->activeAnimations()->notifyAnimationDestroyed(this);
109 #endif 109 #endif
110 } 110 }
111 111
112 void Animation::attach(AnimationPlayer* player) 112 void Animation::attach(AnimationPlayer* player)
113 { 113 {
114 if (m_target) { 114 if (m_target) {
115 m_target->ensureActiveAnimations().addPlayer(player); 115 m_target->ensureActiveAnimations().players().add(player);
116 m_target->setNeedsAnimationStyleRecalc(); 116 m_target->setNeedsAnimationStyleRecalc();
117 } 117 }
118 AnimationNode::attach(player); 118 AnimationNode::attach(player);
119 } 119 }
120 120
121 void Animation::detach() 121 void Animation::detach()
122 { 122 {
123 if (m_target) 123 if (m_target)
124 m_target->activeAnimations()->removePlayer(player()); 124 m_target->activeAnimations()->players().remove(player());
125 if (m_sampledEffect) 125 if (m_sampledEffect)
126 clearEffects(); 126 clearEffects();
127 AnimationNode::detach(); 127 AnimationNode::detach();
128 } 128 }
129 129
130 void Animation::specifiedTimingChanged() 130 void Animation::specifiedTimingChanged()
131 { 131 {
132 cancelAnimationOnCompositor(); 132 cancelAnimationOnCompositor();
133 if (player()) { 133 if (player()) {
134 // FIXME: Needs to consider groups when added. 134 // FIXME: Needs to consider groups when added.
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 307
308 void Animation::trace(Visitor* visitor) 308 void Animation::trace(Visitor* visitor)
309 { 309 {
310 visitor->trace(m_target); 310 visitor->trace(m_target);
311 visitor->trace(m_effect); 311 visitor->trace(m_effect);
312 visitor->trace(m_sampledEffect); 312 visitor->trace(m_sampledEffect);
313 AnimationNode::trace(visitor); 313 AnimationNode::trace(visitor);
314 } 314 }
315 315
316 } // namespace blink 316 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/animation/ActiveAnimations.cpp ('k') | Source/core/animation/AnimationPlayerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698