| 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 29 matching lines...) Expand all Loading... |
| 40 void copyToCompositableValueMap(const AnimationEffect::CompositableValueMap* sou
rce, AnimationEffect::CompositableValueMap& target) | 40 void copyToCompositableValueMap(const AnimationEffect::CompositableValueMap* sou
rce, AnimationEffect::CompositableValueMap& target) |
| 41 { | 41 { |
| 42 if (!source) | 42 if (!source) |
| 43 return; | 43 return; |
| 44 for (AnimationEffect::CompositableValueMap::const_iterator iter = source->be
gin(); iter != source->end(); ++iter) | 44 for (AnimationEffect::CompositableValueMap::const_iterator iter = source->be
gin(); iter != source->end(); ++iter) |
| 45 target.set(iter->key, iter->value); | 45 target.set(iter->key, iter->value); |
| 46 } | 46 } |
| 47 | 47 |
| 48 } // namespace | 48 } // namespace |
| 49 | 49 |
| 50 bool AnimationStack::affects(CSSPropertyID property) const |
| 51 { |
| 52 for (size_t i = 0; i < m_activeAnimations.size(); ++i) { |
| 53 if (m_activeAnimations[i]->affects(property)) |
| 54 return true; |
| 55 } |
| 56 return false; |
| 57 } |
| 58 |
| 59 bool AnimationStack::hasActiveAnimationsOnCompositor(CSSPropertyID property) con
st |
| 60 { |
| 61 for (size_t i = 0; i < m_activeAnimations.size(); ++i) { |
| 62 if (m_activeAnimations[i]->hasActiveAnimationsOnCompositor(property)) |
| 63 return true; |
| 64 } |
| 65 return false; |
| 66 } |
| 67 |
| 50 AnimationEffect::CompositableValueMap AnimationStack::compositableValues(const A
nimationStack* animationStack, const Vector<InertAnimation*>* newAnimations, con
st HashSet<const Player*>* cancelledPlayers, Animation::Priority priority) | 68 AnimationEffect::CompositableValueMap AnimationStack::compositableValues(const A
nimationStack* animationStack, const Vector<InertAnimation*>* newAnimations, con
st HashSet<const Player*>* cancelledPlayers, Animation::Priority priority) |
| 51 { | 69 { |
| 52 AnimationEffect::CompositableValueMap result; | 70 AnimationEffect::CompositableValueMap result; |
| 53 | 71 |
| 54 if (animationStack) { | 72 if (animationStack) { |
| 55 const Vector<Animation*>& animations = animationStack->m_activeAnimation
s; | 73 const Vector<Animation*>& animations = animationStack->m_activeAnimation
s; |
| 56 for (size_t i = 0; i < animations.size(); ++i) { | 74 for (size_t i = 0; i < animations.size(); ++i) { |
| 57 Animation* animation = animations[i]; | 75 Animation* animation = animations[i]; |
| 58 if (animation->priority() != priority) | 76 if (animation->priority() != priority) |
| 59 continue; | 77 continue; |
| 60 if (cancelledPlayers && cancelledPlayers->contains(animation->player
())) | 78 if (cancelledPlayers && cancelledPlayers->contains(animation->player
())) |
| 61 continue; | 79 continue; |
| 62 copyToCompositableValueMap(animation->compositableValues(), result); | 80 copyToCompositableValueMap(animation->compositableValues(), result); |
| 63 } | 81 } |
| 64 } | 82 } |
| 65 | 83 |
| 66 if (newAnimations) { | 84 if (newAnimations) { |
| 67 for (size_t i = 0; i < newAnimations->size(); ++i) | 85 for (size_t i = 0; i < newAnimations->size(); ++i) |
| 68 copyToCompositableValueMap(newAnimations->at(i)->sample().get(), res
ult); | 86 copyToCompositableValueMap(newAnimations->at(i)->sample().get(), res
ult); |
| 69 } | 87 } |
| 70 | 88 |
| 71 return result; | 89 return result; |
| 72 } | 90 } |
| 73 | 91 |
| 74 } // namespace WebCore | 92 } // namespace WebCore |
| OLD | NEW |