| 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 "platform/animation/CompositorFilterKeyframe.h" | 5 #include "platform/animation/CompositorFilterKeyframe.h" |
| 6 | 6 |
| 7 #include <memory> |
| 7 #include "platform/animation/TimingFunction.h" | 8 #include "platform/animation/TimingFunction.h" |
| 8 #include <memory> | |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 CompositorFilterKeyframe::CompositorFilterKeyframe( | 12 CompositorFilterKeyframe::CompositorFilterKeyframe( |
| 13 double time, | 13 double time, |
| 14 CompositorFilterOperations value, | 14 CompositorFilterOperations value, |
| 15 const TimingFunction& timing_function) | 15 const TimingFunction& timing_function) |
| 16 : filter_keyframe_( | 16 : filter_keyframe_( |
| 17 cc::FilterKeyframe::Create(base::TimeDelta::FromSecondsD(time), | 17 cc::FilterKeyframe::Create(base::TimeDelta::FromSecondsD(time), |
| 18 value.ReleaseCcFilterOperations(), | 18 value.ReleaseCcFilterOperations(), |
| 19 timing_function.CloneToCC())) {} | 19 timing_function.CloneToCC())) {} |
| 20 | 20 |
| 21 CompositorFilterKeyframe::~CompositorFilterKeyframe() {} | 21 CompositorFilterKeyframe::~CompositorFilterKeyframe() {} |
| 22 | 22 |
| 23 double CompositorFilterKeyframe::Time() const { | 23 double CompositorFilterKeyframe::Time() const { |
| 24 return filter_keyframe_->Time().InSecondsF(); | 24 return filter_keyframe_->Time().InSecondsF(); |
| 25 } | 25 } |
| 26 | 26 |
| 27 const cc::TimingFunction* CompositorFilterKeyframe::CcTimingFunction() const { | 27 const cc::TimingFunction* CompositorFilterKeyframe::CcTimingFunction() const { |
| 28 return filter_keyframe_->timing_function(); | 28 return filter_keyframe_->timing_function(); |
| 29 } | 29 } |
| 30 | 30 |
| 31 std::unique_ptr<cc::FilterKeyframe> CompositorFilterKeyframe::CloneToCC() | 31 std::unique_ptr<cc::FilterKeyframe> CompositorFilterKeyframe::CloneToCC() |
| 32 const { | 32 const { |
| 33 return filter_keyframe_->Clone(); | 33 return filter_keyframe_->Clone(); |
| 34 } | 34 } |
| 35 | 35 |
| 36 } // namespace blink | 36 } // namespace blink |
| OLD | NEW |