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

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

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, 8 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 20 matching lines...) Expand all
31 #include "config.h" 31 #include "config.h"
32 #include "core/animation/ActiveAnimations.h" 32 #include "core/animation/ActiveAnimations.h"
33 33
34 #include "core/rendering/RenderObject.h" 34 #include "core/rendering/RenderObject.h"
35 35
36 namespace WebCore { 36 namespace WebCore {
37 37
38 void ActiveAnimations::updateAnimationFlags(RenderStyle& style) 38 void ActiveAnimations::updateAnimationFlags(RenderStyle& style)
39 { 39 {
40 for (AnimationPlayerSet::const_iterator it = m_players.begin(); it != player s().end(); ++it) { 40 for (AnimationPlayerSet::const_iterator it = m_players.begin(); it != player s().end(); ++it) {
41 const AnimationPlayer& player = *it->key; 41 AnimationPlayer* player = *it;
42 ASSERT(player.source()); 42 ASSERT(player->source());
43 // FIXME: Needs to consider AnimationGroup once added. 43 // FIXME: Needs to consider AnimationGroup once added.
44 ASSERT(player.source()->isAnimation()); 44 ASSERT(player->source()->isAnimation());
45 const Animation& animation = *toAnimation(player.source()); 45 const Animation& animation = *toAnimation(player->source());
46 if (animation.isCurrent()) { 46 if (animation.isCurrent()) {
47 if (animation.affects(CSSPropertyOpacity)) 47 if (animation.affects(CSSPropertyOpacity))
48 style.setHasCurrentOpacityAnimation(true); 48 style.setHasCurrentOpacityAnimation(true);
49 if (animation.affects(CSSPropertyTransform)) 49 if (animation.affects(CSSPropertyTransform))
50 style.setHasCurrentTransformAnimation(true); 50 style.setHasCurrentTransformAnimation(true);
51 if (animation.affects(CSSPropertyWebkitFilter)) 51 if (animation.affects(CSSPropertyWebkitFilter))
52 style.setHasCurrentFilterAnimation(true); 52 style.setHasCurrentFilterAnimation(true);
53 } 53 }
54 } 54 }
55 55
56 if (style.hasCurrentOpacityAnimation()) 56 if (style.hasCurrentOpacityAnimation())
57 style.setIsRunningOpacityAnimationOnCompositor(m_defaultStack.hasActiveA nimationsOnCompositor(CSSPropertyOpacity)); 57 style.setIsRunningOpacityAnimationOnCompositor(m_defaultStack.hasActiveA nimationsOnCompositor(CSSPropertyOpacity));
58 if (style.hasCurrentTransformAnimation()) 58 if (style.hasCurrentTransformAnimation())
59 style.setIsRunningTransformAnimationOnCompositor(m_defaultStack.hasActiv eAnimationsOnCompositor(CSSPropertyTransform)); 59 style.setIsRunningTransformAnimationOnCompositor(m_defaultStack.hasActiv eAnimationsOnCompositor(CSSPropertyTransform));
60 if (style.hasCurrentFilterAnimation()) 60 if (style.hasCurrentFilterAnimation())
61 style.setIsRunningFilterAnimationOnCompositor(m_defaultStack.hasActiveAn imationsOnCompositor(CSSPropertyWebkitFilter)); 61 style.setIsRunningFilterAnimationOnCompositor(m_defaultStack.hasActiveAn imationsOnCompositor(CSSPropertyWebkitFilter));
62 } 62 }
63 63
64 void ActiveAnimations::cancelAnimationOnCompositor() 64 void ActiveAnimations::cancelAnimationOnCompositor()
65 { 65 {
66 for (AnimationPlayerSet::iterator it = m_players.begin(); it != players().en d(); ++it) 66 for (AnimationPlayerSet::iterator it = m_players.begin(); it != players().en d(); ++it)
67 it->key->cancelAnimationOnCompositor(); 67 (*it)->cancelAnimationOnCompositor();
68 } 68 }
69 69
70 void ActiveAnimations::trace(Visitor* visitor) 70 void ActiveAnimations::trace(Visitor* visitor)
71 { 71 {
72 visitor->trace(m_cssAnimations); 72 visitor->trace(m_cssAnimations);
73 visitor->trace(m_defaultStack);
74 visitor->trace(m_players);
73 } 75 }
74 76
75 } // namespace WebCore 77 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698