| 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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 CompositorTransformOperations ops; | 531 CompositorTransformOperations ops; |
| 532 toCompositorTransformOperations( | 532 toCompositorTransformOperations( |
| 533 toAnimatableTransform(value)->transformOperations(), &ops); | 533 toAnimatableTransform(value)->transformOperations(), &ops); |
| 534 | 534 |
| 535 CompositorTransformKeyframe transformKeyframe( | 535 CompositorTransformKeyframe transformKeyframe( |
| 536 keyframe->offset(), std::move(ops), keyframeTimingFunction); | 536 keyframe->offset(), std::move(ops), keyframeTimingFunction); |
| 537 curve.addKeyframe(transformKeyframe); | 537 curve.addKeyframe(transformKeyframe); |
| 538 } | 538 } |
| 539 | 539 |
| 540 template <typename PlatformAnimationCurveType> | 540 template <typename PlatformAnimationCurveType> |
| 541 void addKeyframesToCurve( | 541 void addKeyframesToCurve(PlatformAnimationCurveType& curve, |
| 542 PlatformAnimationCurveType& curve, | 542 const PropertySpecificKeyframeVector& keyframes) { |
| 543 const AnimatableValuePropertySpecificKeyframeVector& keyframes) { | |
| 544 auto* lastKeyframe = keyframes.back().get(); | 543 auto* lastKeyframe = keyframes.back().get(); |
| 545 for (const auto& keyframe : keyframes) { | 544 for (const auto& keyframe : keyframes) { |
| 546 const TimingFunction* keyframeTimingFunction = 0; | 545 const TimingFunction* keyframeTimingFunction = 0; |
| 547 // Ignore timing function of last frame. | 546 // Ignore timing function of last frame. |
| 548 if (keyframe == lastKeyframe) | 547 if (keyframe == lastKeyframe) |
| 549 keyframeTimingFunction = LinearTimingFunction::shared(); | 548 keyframeTimingFunction = LinearTimingFunction::shared(); |
| 550 else | 549 else |
| 551 keyframeTimingFunction = &keyframe->easing(); | 550 keyframeTimingFunction = &keyframe->easing(); |
| 552 | 551 |
| 553 const AnimatableValue* value = keyframe->getAnimatableValue().get(); | 552 const AnimatableValue* value = keyframe->getAnimatableValue().get(); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 animation->setTimeOffset(compositorTiming.scaledTimeOffset); | 638 animation->setTimeOffset(compositorTiming.scaledTimeOffset); |
| 640 animation->setDirection(compositorTiming.direction); | 639 animation->setDirection(compositorTiming.direction); |
| 641 animation->setPlaybackRate(compositorTiming.playbackRate); | 640 animation->setPlaybackRate(compositorTiming.playbackRate); |
| 642 animation->setFillMode(compositorTiming.fillMode); | 641 animation->setFillMode(compositorTiming.fillMode); |
| 643 animations.push_back(std::move(animation)); | 642 animations.push_back(std::move(animation)); |
| 644 } | 643 } |
| 645 DCHECK(!animations.isEmpty()); | 644 DCHECK(!animations.isEmpty()); |
| 646 } | 645 } |
| 647 | 646 |
| 648 } // namespace blink | 647 } // namespace blink |
| OLD | NEW |