| 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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 | 511 |
| 512 CompositorTransformKeyframe transformKeyframe( | 512 CompositorTransformKeyframe transformKeyframe( |
| 513 keyframe->offset(), std::move(ops), keyframeTimingFunction); | 513 keyframe->offset(), std::move(ops), keyframeTimingFunction); |
| 514 curve.addKeyframe(transformKeyframe); | 514 curve.addKeyframe(transformKeyframe); |
| 515 } | 515 } |
| 516 | 516 |
| 517 template <typename PlatformAnimationCurveType> | 517 template <typename PlatformAnimationCurveType> |
| 518 void addKeyframesToCurve( | 518 void addKeyframesToCurve( |
| 519 PlatformAnimationCurveType& curve, | 519 PlatformAnimationCurveType& curve, |
| 520 const AnimatableValuePropertySpecificKeyframeVector& keyframes) { | 520 const AnimatableValuePropertySpecificKeyframeVector& keyframes) { |
| 521 auto* lastKeyframe = keyframes.last().get(); | 521 auto* lastKeyframe = keyframes.back().get(); |
| 522 for (const auto& keyframe : keyframes) { | 522 for (const auto& keyframe : keyframes) { |
| 523 const TimingFunction* keyframeTimingFunction = 0; | 523 const TimingFunction* keyframeTimingFunction = 0; |
| 524 // Ignore timing function of last frame. | 524 // Ignore timing function of last frame. |
| 525 if (keyframe == lastKeyframe) | 525 if (keyframe == lastKeyframe) |
| 526 keyframeTimingFunction = LinearTimingFunction::shared(); | 526 keyframeTimingFunction = LinearTimingFunction::shared(); |
| 527 else | 527 else |
| 528 keyframeTimingFunction = &keyframe->easing(); | 528 keyframeTimingFunction = &keyframe->easing(); |
| 529 | 529 |
| 530 const AnimatableValue* value = keyframe->getAnimatableValue().get(); | 530 const AnimatableValue* value = keyframe->getAnimatableValue().get(); |
| 531 addKeyframeToCurve(curve, keyframe.get(), value, *keyframeTimingFunction); | 531 addKeyframeToCurve(curve, keyframe.get(), value, *keyframeTimingFunction); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 animation->setTimeOffset(compositorTiming.scaledTimeOffset); | 616 animation->setTimeOffset(compositorTiming.scaledTimeOffset); |
| 617 animation->setDirection(compositorTiming.direction); | 617 animation->setDirection(compositorTiming.direction); |
| 618 animation->setPlaybackRate(compositorTiming.playbackRate); | 618 animation->setPlaybackRate(compositorTiming.playbackRate); |
| 619 animation->setFillMode(compositorTiming.fillMode); | 619 animation->setFillMode(compositorTiming.fillMode); |
| 620 animations.append(std::move(animation)); | 620 animations.append(std::move(animation)); |
| 621 } | 621 } |
| 622 DCHECK(!animations.isEmpty()); | 622 DCHECK(!animations.isEmpty()); |
| 623 } | 623 } |
| 624 | 624 |
| 625 } // namespace blink | 625 } // namespace blink |
| OLD | NEW |