| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 // TODO(dstockwell): move the playing check into AnimationEffectReadOnly and | 93 // TODO(dstockwell): move the playing check into AnimationEffectReadOnly and |
| 94 // expose both hasAnimations and hasActiveAnimations | 94 // expose both hasAnimations and hasActiveAnimations |
| 95 if (sampledEffect->effect() && | 95 if (sampledEffect->effect() && |
| 96 sampledEffect->effect()->animation()->playing() && | 96 sampledEffect->effect()->animation()->playing() && |
| 97 sampledEffect->effect()->hasActiveAnimationsOnCompositor(property)) | 97 sampledEffect->effect()->hasActiveAnimationsOnCompositor(property)) |
| 98 return true; | 98 return true; |
| 99 } | 99 } |
| 100 return false; | 100 return false; |
| 101 } | 101 } |
| 102 | 102 |
| 103 bool EffectStack::affectsProperties(PropertyHandleFilter filter) const { | |
| 104 for (const auto& sampledEffect : m_sampledEffects) { | |
| 105 for (const auto& interpolation : sampledEffect->interpolations()) { | |
| 106 if (filter(interpolation->getProperty())) | |
| 107 return true; | |
| 108 } | |
| 109 } | |
| 110 return false; | |
| 111 } | |
| 112 | |
| 113 ActiveInterpolationsMap EffectStack::activeInterpolations( | 103 ActiveInterpolationsMap EffectStack::activeInterpolations( |
| 114 EffectStack* effectStack, | 104 EffectStack* effectStack, |
| 115 const HeapVector<Member<const InertEffect>>* newAnimations, | 105 const HeapVector<Member<const InertEffect>>* newAnimations, |
| 116 const HeapHashSet<Member<const Animation>>* suppressedAnimations, | 106 const HeapHashSet<Member<const Animation>>* suppressedAnimations, |
| 117 KeyframeEffectReadOnly::Priority priority, | 107 KeyframeEffectReadOnly::Priority priority, |
| 118 PropertyHandleFilter propertyHandleFilter) { | 108 PropertyHandleFilter propertyHandleFilter) { |
| 119 ActiveInterpolationsMap result; | 109 ActiveInterpolationsMap result; |
| 120 | 110 |
| 121 if (effectStack) { | 111 if (effectStack) { |
| 122 HeapVector<Member<SampledEffect>>& sampledEffects = | 112 HeapVector<Member<SampledEffect>>& sampledEffects = |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 if (!CompositorAnimations::getAnimatedBoundingBox( | 172 if (!CompositorAnimations::getAnimatedBoundingBox( |
| 183 expandingBox, *effect->model(), startRange, endRange)) | 173 expandingBox, *effect->model(), startRange, endRange)) |
| 184 return false; | 174 return false; |
| 185 box.expandTo(expandingBox); | 175 box.expandTo(expandingBox); |
| 186 } | 176 } |
| 187 } | 177 } |
| 188 return true; | 178 return true; |
| 189 } | 179 } |
| 190 | 180 |
| 191 } // namespace blink | 181 } // namespace blink |
| OLD | NEW |