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 13 matching lines...) Expand all Loading... |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
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 "core/animation/AnimationStack.h" | 31 #include "core/animation/AnimationStack.h" |
32 | 32 |
33 #include "core/animation/CompositorAnimations.h" | 33 #include "core/animation/CompositorAnimations.h" |
34 #include "core/animation/InvalidatableInterpolation.h" | |
35 #include "core/animation/css/CSSAnimations.h" | 34 #include "core/animation/css/CSSAnimations.h" |
36 #include "platform/RuntimeEnabledFeatures.h" | 35 #include "platform/RuntimeEnabledFeatures.h" |
37 #include "wtf/NonCopyingSort.h" | 36 #include "wtf/NonCopyingSort.h" |
38 #include <algorithm> | 37 #include <algorithm> |
39 | 38 |
40 namespace blink { | 39 namespace blink { |
41 | 40 |
42 namespace { | 41 namespace { |
43 | 42 |
44 void copyToActiveInterpolationsMap(const Vector<RefPtr<Interpolation>>& source,
AnimationStack::PropertyHandleFilter propertyHandleFilter, ActiveInterpolationsM
ap& target) | 43 void copyToActiveInterpolationsMap(const Vector<RefPtr<Interpolation>>& source,
AnimationStack::PropertyHandleFilter propertyHandleFilter, ActiveInterpolationsM
ap& target) |
45 { | 44 { |
46 for (const auto& interpolation : source) { | 45 for (const auto& interpolation : source) { |
47 PropertyHandle property = interpolation->getProperty(); | 46 PropertyHandle property = interpolation->getProperty(); |
48 if (propertyHandleFilter && !propertyHandleFilter(property)) | 47 if (propertyHandleFilter && !propertyHandleFilter(property)) |
49 continue; | 48 continue; |
50 ActiveInterpolationsMap::AddResult entry = target.add(property, ActiveIn
terpolations(1)); | 49 ActiveInterpolationsMap::AddResult entry = target.add(property, ActiveIn
terpolations(1)); |
51 ActiveInterpolations& activeInterpolations = entry.storedValue->value; | 50 ActiveInterpolations& activeInterpolations = entry.storedValue->value; |
52 if (!entry.isNewEntry | 51 if (!entry.isNewEntry |
53 && (RuntimeEnabledFeatures::stackedCSSPropertyAnimationsEnabled() ||
!property.isCSSProperty() || property.isPresentationAttribute()) | 52 && (RuntimeEnabledFeatures::stackedCSSPropertyAnimationsEnabled() ||
!property.isCSSProperty() || property.isPresentationAttribute()) |
54 && interpolation->isInvalidatableInterpolation() | 53 && interpolation->dependsOnUnderlyingValue()) { |
55 && toInvalidatableInterpolation(*interpolation).dependsOnUnderlyingV
alue()) { | |
56 activeInterpolations.append(interpolation.get()); | 54 activeInterpolations.append(interpolation.get()); |
57 } else { | 55 } else { |
58 activeInterpolations.at(0) = interpolation.get(); | 56 activeInterpolations.at(0) = interpolation.get(); |
59 } | 57 } |
60 } | 58 } |
61 } | 59 } |
62 | 60 |
63 bool compareSampledEffects(const Member<SampledEffect>& sampledEffect1, const Me
mber<SampledEffect>& sampledEffect2) | 61 bool compareSampledEffects(const Member<SampledEffect>& sampledEffect1, const Me
mber<SampledEffect>& sampledEffect2) |
64 { | 62 { |
65 ASSERT(sampledEffect1 && sampledEffect2); | 63 ASSERT(sampledEffect1 && sampledEffect2); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 FloatBox expandingBox(originalBox); | 151 FloatBox expandingBox(originalBox); |
154 if (!CompositorAnimations::getAnimatedBoundingBox(expandingBox, *eff
ect->model(), startRange, endRange)) | 152 if (!CompositorAnimations::getAnimatedBoundingBox(expandingBox, *eff
ect->model(), startRange, endRange)) |
155 return false; | 153 return false; |
156 box.expandTo(expandingBox); | 154 box.expandTo(expandingBox); |
157 } | 155 } |
158 } | 156 } |
159 return true; | 157 return true; |
160 } | 158 } |
161 | 159 |
162 } // namespace blink | 160 } // namespace blink |
OLD | NEW |