Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Side by Side Diff: third_party/WebKit/Source/core/animation/CompositorAnimations.cpp

Issue 2335253002: Push CompositorFilterOperations creation out of GraphicsLayer (Closed)
Patch Set: The right FilterOperations Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 DCHECK_GE(out.iterationStart, 0); 412 DCHECK_GE(out.iterationStart, 0);
413 413
414 return true; 414 return true;
415 } 415 }
416 416
417 namespace { 417 namespace {
418 418
419 void addKeyframeToCurve(CompositorFilterAnimationCurve& curve, Keyframe::Propert ySpecificKeyframe* keyframe, 419 void addKeyframeToCurve(CompositorFilterAnimationCurve& curve, Keyframe::Propert ySpecificKeyframe* keyframe,
420 const AnimatableValue* value, const TimingFunction& keyframeTimingFunction) 420 const AnimatableValue* value, const TimingFunction& keyframeTimingFunction)
421 { 421 {
422 CompositorFilterOperations ops; 422 CompositorFilterKeyframe filterKeyframe(
423 toCompositorFilterOperations(toAnimatableFilterOperations(value)->operations (), &ops); 423 keyframe->offset(),
424 424 toCompositorFilterOperations(toAnimatableFilterOperations(value)->operat ions()),
425 CompositorFilterKeyframe filterKeyframe(keyframe->offset(), std::move(ops), keyframeTimingFunction); 425 keyframeTimingFunction);
426 curve.addKeyframe(filterKeyframe); 426 curve.addKeyframe(filterKeyframe);
427 } 427 }
428 428
429 void addKeyframeToCurve(CompositorFloatAnimationCurve& curve, Keyframe::Property SpecificKeyframe* keyframe, 429 void addKeyframeToCurve(CompositorFloatAnimationCurve& curve, Keyframe::Property SpecificKeyframe* keyframe,
430 const AnimatableValue* value, const TimingFunction& keyframeTimingFunction) 430 const AnimatableValue* value, const TimingFunction& keyframeTimingFunction)
431 { 431 {
432 CompositorFloatKeyframe floatKeyframe(keyframe->offset(), toAnimatableDouble (value)->toDouble(), keyframeTimingFunction); 432 CompositorFloatKeyframe floatKeyframe(keyframe->offset(), toAnimatableDouble (value)->toDouble(), keyframeTimingFunction);
433 curve.addKeyframe(floatKeyframe); 433 curve.addKeyframe(floatKeyframe);
434 } 434 }
435 435
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698