| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "CustomCompositorAnimations.h" | 5 #include "CustomCompositorAnimations.h" |
| 6 | 6 |
| 7 #include "core/animation/Animation.h" | 7 #include "core/animation/Animation.h" |
| 8 #include "core/animation/DocumentTimeline.h" | 8 #include "core/animation/DocumentTimeline.h" |
| 9 #include "core/animation/KeyframeEffect.h" | 9 #include "core/animation/KeyframeEffect.h" |
| 10 #include "core/animation/KeyframeEffectModel.h" | 10 #include "core/animation/KeyframeEffectModel.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 void CustomCompositorAnimations::applyUpdate( | 85 void CustomCompositorAnimations::applyUpdate( |
| 86 Element& element, | 86 Element& element, |
| 87 const CompositorMutation& mutation) { | 87 const CompositorMutation& mutation) { |
| 88 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("compositor-worker"), | 88 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("compositor-worker"), |
| 89 "CustomCompositorAnimations::applyUpdate"); | 89 "CustomCompositorAnimations::applyUpdate"); |
| 90 | 90 |
| 91 if (mutation.isOpacityMutated()) { | 91 if (mutation.isOpacityMutated()) { |
| 92 RefPtr<AnimatableValue> animatableValue = | 92 RefPtr<AnimatableValue> animatableValue = |
| 93 AnimatableDouble::create(mutation.opacity()); | 93 AnimatableDouble::create(mutation.opacity()); |
| 94 m_animation = createOrUpdateAnimation( | 94 m_animation = createOrUpdateAnimation( |
| 95 m_animation, element, CSSPropertyOpacity, animatableValue.release()); | 95 m_animation, element, CSSPropertyOpacity, std::move(animatableValue)); |
| 96 } | 96 } |
| 97 if (mutation.isTransformMutated()) { | 97 if (mutation.isTransformMutated()) { |
| 98 TransformOperations ops; | 98 TransformOperations ops; |
| 99 ops.operations().push_back(Matrix3DTransformOperation::create( | 99 ops.operations().push_back(Matrix3DTransformOperation::create( |
| 100 TransformationMatrix(mutation.transform()))); | 100 TransformationMatrix(mutation.transform()))); |
| 101 RefPtr<AnimatableValue> animatableValue = | 101 RefPtr<AnimatableValue> animatableValue = |
| 102 AnimatableTransform::create(ops, 1); | 102 AnimatableTransform::create(ops, 1); |
| 103 m_animation = createOrUpdateAnimation( | 103 m_animation = createOrUpdateAnimation( |
| 104 m_animation, element, CSSPropertyTransform, animatableValue.release()); | 104 m_animation, element, CSSPropertyTransform, std::move(animatableValue)); |
| 105 } | 105 } |
| 106 } | 106 } |
| 107 | 107 |
| 108 } // namespace blink | 108 } // namespace blink |
| OLD | NEW |