| 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 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 const AnimatableValuePropertySpecificKeyframeVector& keyframes) { | 520 const AnimatableValuePropertySpecificKeyframeVector& keyframes) { |
| 521 auto* lastKeyframe = keyframes.last().get(); | 521 auto* lastKeyframe = keyframes.last().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 // FIXME: This relies on StringKeyframes being eagerly evaluated, which will | |
| 531 // not happen eventually. Instead we should extract the CSSValue here | |
| 532 // and convert using another set of toAnimatableXXXOperations functions. | |
| 533 const AnimatableValue* value = keyframe->getAnimatableValue().get(); | 530 const AnimatableValue* value = keyframe->getAnimatableValue().get(); |
| 534 | |
| 535 addKeyframeToCurve(curve, keyframe.get(), value, *keyframeTimingFunction); | 531 addKeyframeToCurve(curve, keyframe.get(), value, *keyframeTimingFunction); |
| 536 } | 532 } |
| 537 } | 533 } |
| 538 | 534 |
| 539 } // namespace | 535 } // namespace |
| 540 | 536 |
| 541 void CompositorAnimations::getAnimationOnCompositor( | 537 void CompositorAnimations::getAnimationOnCompositor( |
| 542 const Timing& timing, | 538 const Timing& timing, |
| 543 int group, | 539 int group, |
| 544 double startTime, | 540 double startTime, |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 animation->setTimeOffset(compositorTiming.scaledTimeOffset); | 616 animation->setTimeOffset(compositorTiming.scaledTimeOffset); |
| 621 animation->setDirection(compositorTiming.direction); | 617 animation->setDirection(compositorTiming.direction); |
| 622 animation->setPlaybackRate(compositorTiming.playbackRate); | 618 animation->setPlaybackRate(compositorTiming.playbackRate); |
| 623 animation->setFillMode(compositorTiming.fillMode); | 619 animation->setFillMode(compositorTiming.fillMode); |
| 624 animations.append(std::move(animation)); | 620 animations.append(std::move(animation)); |
| 625 } | 621 } |
| 626 DCHECK(!animations.isEmpty()); | 622 DCHECK(!animations.isEmpty()); |
| 627 } | 623 } |
| 628 | 624 |
| 629 } // namespace blink | 625 } // namespace blink |
| OLD | NEW |