| 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 14 matching lines...) Expand all Loading... |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 #include "core/animation/AnimationStack.h" | 32 #include "core/animation/AnimationStack.h" |
| 33 | 33 |
| 34 #include "core/animation/CompositorAnimations.h" | 34 #include "core/animation/CompositorAnimations.h" |
| 35 #include "core/animation/InvalidatableStyleInterpolation.h" | 35 #include "core/animation/InvalidatableInterpolation.h" |
| 36 #include "core/animation/css/CSSAnimations.h" | 36 #include "core/animation/css/CSSAnimations.h" |
| 37 #include "platform/RuntimeEnabledFeatures.h" | 37 #include "platform/RuntimeEnabledFeatures.h" |
| 38 #include "wtf/BitArray.h" | 38 #include "wtf/BitArray.h" |
| 39 #include "wtf/NonCopyingSort.h" | 39 #include "wtf/NonCopyingSort.h" |
| 40 #include <algorithm> | 40 #include <algorithm> |
| 41 | 41 |
| 42 namespace blink { | 42 namespace blink { |
| 43 | 43 |
| 44 namespace { | 44 namespace { |
| 45 | 45 |
| 46 void copyToActiveInterpolationsMap(const Vector<RefPtr<Interpolation>>& source,
ActiveInterpolationsMap& target) | 46 void copyToActiveInterpolationsMap(const Vector<RefPtr<Interpolation>>& source,
ActiveInterpolationsMap& target) |
| 47 { | 47 { |
| 48 for (const auto& interpolation : source) { | 48 for (const auto& interpolation : source) { |
| 49 ActiveInterpolationsMap::AddResult entry = target.add(interpolation->pro
perty(), ActiveInterpolations(1)); | 49 ActiveInterpolationsMap::AddResult entry = target.add(interpolation->pro
perty(), ActiveInterpolations(1)); |
| 50 ActiveInterpolations& activeInterpolations = entry.storedValue->value; | 50 ActiveInterpolations& activeInterpolations = entry.storedValue->value; |
| 51 if (!entry.isNewEntry | 51 if (!entry.isNewEntry |
| 52 && RuntimeEnabledFeatures::stackedCSSPropertyAnimationsEnabled() | 52 && RuntimeEnabledFeatures::stackedCSSPropertyAnimationsEnabled() |
| 53 && interpolation->isInvalidatableStyleInterpolation() | 53 && interpolation->isInvalidatableInterpolation() |
| 54 && toInvalidatableStyleInterpolation(*interpolation).dependsOnUnderl
yingValue()) { | 54 && toInvalidatableInterpolation(*interpolation).dependsOnUnderlyingV
alue()) { |
| 55 activeInterpolations.append(interpolation.get()); | 55 activeInterpolations.append(interpolation.get()); |
| 56 } else { | 56 } else { |
| 57 activeInterpolations.at(0) = interpolation.get(); | 57 activeInterpolations.at(0) = interpolation.get(); |
| 58 } | 58 } |
| 59 } | 59 } |
| 60 } | 60 } |
| 61 | 61 |
| 62 bool compareEffects(const Member<SampledEffect>& effect1, const Member<SampledEf
fect>& effect2) | 62 bool compareEffects(const Member<SampledEffect>& effect1, const Member<SampledEf
fect>& effect2) |
| 63 { | 63 { |
| 64 ASSERT(effect1 && effect2); | 64 ASSERT(effect1 && effect2); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 FloatBox expandingBox(originalBox); | 141 FloatBox expandingBox(originalBox); |
| 142 if (!CompositorAnimations::instance()->getAnimatedBoundingBox(expand
ingBox, *effect->model(), startRange, endRange)) | 142 if (!CompositorAnimations::instance()->getAnimatedBoundingBox(expand
ingBox, *effect->model(), startRange, endRange)) |
| 143 return false; | 143 return false; |
| 144 box.expandTo(expandingBox); | 144 box.expandTo(expandingBox); |
| 145 } | 145 } |
| 146 } | 146 } |
| 147 return true; | 147 return true; |
| 148 } | 148 } |
| 149 | 149 |
| 150 } // namespace blink | 150 } // namespace blink |
| OLD | NEW |