| 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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 | 368 |
| 369 Vector<std::unique_ptr<CompositorAnimation>> animations; | 369 Vector<std::unique_ptr<CompositorAnimation>> animations; |
| 370 getAnimationOnCompositor(timing, group, startTime, timeOffset, keyframeEffect, | 370 getAnimationOnCompositor(timing, group, startTime, timeOffset, keyframeEffect, |
| 371 animations, animationPlaybackRate); | 371 animations, animationPlaybackRate); |
| 372 DCHECK(!animations.isEmpty()); | 372 DCHECK(!animations.isEmpty()); |
| 373 for (auto& compositorAnimation : animations) { | 373 for (auto& compositorAnimation : animations) { |
| 374 int id = compositorAnimation->id(); | 374 int id = compositorAnimation->id(); |
| 375 CompositorAnimationPlayer* compositorPlayer = animation.compositorPlayer(); | 375 CompositorAnimationPlayer* compositorPlayer = animation.compositorPlayer(); |
| 376 DCHECK(compositorPlayer); | 376 DCHECK(compositorPlayer); |
| 377 compositorPlayer->addAnimation(std::move(compositorAnimation)); | 377 compositorPlayer->addAnimation(std::move(compositorAnimation)); |
| 378 startedAnimationIds.append(id); | 378 startedAnimationIds.push_back(id); |
| 379 } | 379 } |
| 380 DCHECK(!startedAnimationIds.isEmpty()); | 380 DCHECK(!startedAnimationIds.isEmpty()); |
| 381 } | 381 } |
| 382 | 382 |
| 383 void CompositorAnimations::cancelAnimationOnCompositor( | 383 void CompositorAnimations::cancelAnimationOnCompositor( |
| 384 const Element& element, | 384 const Element& element, |
| 385 const Animation& animation, | 385 const Animation& animation, |
| 386 int id) { | 386 int id) { |
| 387 if (!canStartAnimationOnCompositor(element)) { | 387 if (!canStartAnimationOnCompositor(element)) { |
| 388 // When an element is being detached, we cancel any associated | 388 // When an element is being detached, we cancel any associated |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 | 610 |
| 611 if (!std::isnan(startTime)) | 611 if (!std::isnan(startTime)) |
| 612 animation->setStartTime(startTime); | 612 animation->setStartTime(startTime); |
| 613 | 613 |
| 614 animation->setIterations(compositorTiming.adjustedIterationCount); | 614 animation->setIterations(compositorTiming.adjustedIterationCount); |
| 615 animation->setIterationStart(compositorTiming.iterationStart); | 615 animation->setIterationStart(compositorTiming.iterationStart); |
| 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.push_back(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 |