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 12 matching lines...) Expand all Loading... |
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
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/CompositorAnimations.h" | 31 #include "core/animation/CompositorAnimations.h" |
32 | 32 |
| 33 #include <algorithm> |
| 34 #include <cmath> |
| 35 #include <memory> |
33 #include "core/animation/AnimationEffectReadOnly.h" | 36 #include "core/animation/AnimationEffectReadOnly.h" |
34 #include "core/animation/ElementAnimations.h" | 37 #include "core/animation/ElementAnimations.h" |
35 #include "core/animation/KeyframeEffectModel.h" | 38 #include "core/animation/KeyframeEffectModel.h" |
36 #include "core/animation/animatable/AnimatableDouble.h" | 39 #include "core/animation/animatable/AnimatableDouble.h" |
37 #include "core/animation/animatable/AnimatableFilterOperations.h" | 40 #include "core/animation/animatable/AnimatableFilterOperations.h" |
38 #include "core/animation/animatable/AnimatableTransform.h" | 41 #include "core/animation/animatable/AnimatableTransform.h" |
39 #include "core/animation/animatable/AnimatableValue.h" | 42 #include "core/animation/animatable/AnimatableValue.h" |
40 #include "core/dom/DOMNodeIds.h" | 43 #include "core/dom/DOMNodeIds.h" |
41 #include "core/layout/LayoutBoxModelObject.h" | 44 #include "core/layout/LayoutBoxModelObject.h" |
42 #include "core/layout/LayoutObject.h" | 45 #include "core/layout/LayoutObject.h" |
43 #include "core/layout/compositing/CompositedLayerMapping.h" | 46 #include "core/layout/compositing/CompositedLayerMapping.h" |
44 #include "core/paint/FilterEffectBuilder.h" | 47 #include "core/paint/FilterEffectBuilder.h" |
45 #include "core/paint/ObjectPaintProperties.h" | 48 #include "core/paint/ObjectPaintProperties.h" |
46 #include "core/paint/PaintLayer.h" | 49 #include "core/paint/PaintLayer.h" |
47 #include "platform/animation/AnimationTranslationUtil.h" | 50 #include "platform/animation/AnimationTranslationUtil.h" |
48 #include "platform/animation/CompositorAnimation.h" | 51 #include "platform/animation/CompositorAnimation.h" |
49 #include "platform/animation/CompositorAnimationPlayer.h" | 52 #include "platform/animation/CompositorAnimationPlayer.h" |
50 #include "platform/animation/CompositorFilterAnimationCurve.h" | 53 #include "platform/animation/CompositorFilterAnimationCurve.h" |
51 #include "platform/animation/CompositorFilterKeyframe.h" | 54 #include "platform/animation/CompositorFilterKeyframe.h" |
52 #include "platform/animation/CompositorFloatAnimationCurve.h" | 55 #include "platform/animation/CompositorFloatAnimationCurve.h" |
53 #include "platform/animation/CompositorFloatKeyframe.h" | 56 #include "platform/animation/CompositorFloatKeyframe.h" |
54 #include "platform/animation/CompositorTransformAnimationCurve.h" | 57 #include "platform/animation/CompositorTransformAnimationCurve.h" |
55 #include "platform/animation/CompositorTransformKeyframe.h" | 58 #include "platform/animation/CompositorTransformKeyframe.h" |
56 #include "platform/geometry/FloatBox.h" | 59 #include "platform/geometry/FloatBox.h" |
57 #include "public/platform/Platform.h" | 60 #include "public/platform/Platform.h" |
58 #include "wtf/PtrUtil.h" | 61 #include "wtf/PtrUtil.h" |
59 #include <algorithm> | |
60 #include <cmath> | |
61 #include <memory> | |
62 | 62 |
63 namespace blink { | 63 namespace blink { |
64 | 64 |
65 namespace { | 65 namespace { |
66 | 66 |
67 bool considerAnimationAsIncompatible(const Animation& animation, | 67 bool considerAnimationAsIncompatible(const Animation& animation, |
68 const Animation& animationToAdd) { | 68 const Animation& animationToAdd) { |
69 if (&animation == &animationToAdd) | 69 if (&animation == &animationToAdd) |
70 return false; | 70 return false; |
71 | 71 |
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
639 animation->setTimeOffset(compositorTiming.scaledTimeOffset); | 639 animation->setTimeOffset(compositorTiming.scaledTimeOffset); |
640 animation->setDirection(compositorTiming.direction); | 640 animation->setDirection(compositorTiming.direction); |
641 animation->setPlaybackRate(compositorTiming.playbackRate); | 641 animation->setPlaybackRate(compositorTiming.playbackRate); |
642 animation->setFillMode(compositorTiming.fillMode); | 642 animation->setFillMode(compositorTiming.fillMode); |
643 animations.push_back(std::move(animation)); | 643 animations.push_back(std::move(animation)); |
644 } | 644 } |
645 DCHECK(!animations.isEmpty()); | 645 DCHECK(!animations.isEmpty()); |
646 } | 646 } |
647 | 647 |
648 } // namespace blink | 648 } // namespace blink |
OLD | NEW |