| 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 | 320 |
| 321 const KeyframeEffectModelBase& keyframeEffect = toKeyframeEffectModelBase(ef
fect); | 321 const KeyframeEffectModelBase& keyframeEffect = toKeyframeEffectModelBase(ef
fect); |
| 322 | 322 |
| 323 Vector<std::unique_ptr<CompositorAnimation>> animations; | 323 Vector<std::unique_ptr<CompositorAnimation>> animations; |
| 324 getAnimationOnCompositor(timing, group, startTime, timeOffset, keyframeEffec
t, animations, animationPlaybackRate); | 324 getAnimationOnCompositor(timing, group, startTime, timeOffset, keyframeEffec
t, animations, animationPlaybackRate); |
| 325 DCHECK(!animations.isEmpty()); | 325 DCHECK(!animations.isEmpty()); |
| 326 for (auto& compositorAnimation : animations) { | 326 for (auto& compositorAnimation : animations) { |
| 327 int id = compositorAnimation->id(); | 327 int id = compositorAnimation->id(); |
| 328 CompositorAnimationPlayer* compositorPlayer = animation.compositorPlayer
(); | 328 CompositorAnimationPlayer* compositorPlayer = animation.compositorPlayer
(); |
| 329 DCHECK(compositorPlayer); | 329 DCHECK(compositorPlayer); |
| 330 compositorPlayer->addAnimation(compositorAnimation.release()); | 330 compositorPlayer->addAnimation(std::move(compositorAnimation)); |
| 331 startedAnimationIds.append(id); | 331 startedAnimationIds.append(id); |
| 332 } | 332 } |
| 333 DCHECK(!startedAnimationIds.isEmpty()); | 333 DCHECK(!startedAnimationIds.isEmpty()); |
| 334 } | 334 } |
| 335 | 335 |
| 336 void CompositorAnimations::cancelAnimationOnCompositor(const Element& element, c
onst Animation& animation, int id) | 336 void CompositorAnimations::cancelAnimationOnCompositor(const Element& element, c
onst Animation& animation, int id) |
| 337 { | 337 { |
| 338 if (!canStartAnimationOnCompositor(element)) { | 338 if (!canStartAnimationOnCompositor(element)) { |
| 339 // When an element is being detached, we cancel any associated | 339 // When an element is being detached, we cancel any associated |
| 340 // Animations for CSS animations. But by the time we get | 340 // Animations for CSS animations. But by the time we get |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 animation->setTimeOffset(compositorTiming.scaledTimeOffset); | 536 animation->setTimeOffset(compositorTiming.scaledTimeOffset); |
| 537 animation->setDirection(compositorTiming.direction); | 537 animation->setDirection(compositorTiming.direction); |
| 538 animation->setPlaybackRate(compositorTiming.playbackRate); | 538 animation->setPlaybackRate(compositorTiming.playbackRate); |
| 539 animation->setFillMode(compositorTiming.fillMode); | 539 animation->setFillMode(compositorTiming.fillMode); |
| 540 animations.append(std::move(animation)); | 540 animations.append(std::move(animation)); |
| 541 } | 541 } |
| 542 DCHECK(!animations.isEmpty()); | 542 DCHECK(!animations.isEmpty()); |
| 543 } | 543 } |
| 544 | 544 |
| 545 } // namespace blink | 545 } // namespace blink |
| OLD | NEW |