| Index: Source/core/animation/CompositorAnimations.cpp
|
| diff --git a/Source/core/animation/CompositorAnimations.cpp b/Source/core/animation/CompositorAnimations.cpp
|
| index 33cc0081a002eb78e90d7916a96c2aa83d76fe62..5e9dbcf7270d8611f35bed9d75f5625ac8ea486f 100644
|
| --- a/Source/core/animation/CompositorAnimations.cpp
|
| +++ b/Source/core/animation/CompositorAnimations.cpp
|
| @@ -43,7 +43,7 @@
|
| #include "core/rendering/compositing/CompositedLayerMapping.h"
|
| #include "platform/geometry/FloatBox.h"
|
| #include "public/platform/Platform.h"
|
| -#include "public/platform/WebCompositorAnimation.h"
|
| +#include "public/platform/WebAnimation.h"
|
| #include "public/platform/WebCompositorSupport.h"
|
| #include "public/platform/WebFilterAnimationCurve.h"
|
| #include "public/platform/WebFilterKeyframe.h"
|
| @@ -257,7 +257,7 @@
|
| RenderLayer* layer = toRenderBoxModelObject(element.renderer())->layer();
|
| ASSERT(layer);
|
|
|
| - Vector<OwnPtr<WebCompositorAnimation> > animations;
|
| + Vector<OwnPtr<blink::WebAnimation> > animations;
|
| CompositorAnimationsImpl::getAnimationOnCompositor(timing, startTime, keyframeEffect, animations);
|
| ASSERT(!animations.isEmpty());
|
| for (size_t i = 0; i < animations.size(); ++i) {
|
| @@ -366,7 +366,7 @@
|
|
|
| switch (timingFunction->type()) {
|
| case TimingFunction::LinearFunction:
|
| - curve.add(keyframe, WebCompositorAnimationCurve::TimingFunctionTypeLinear);
|
| + curve.add(keyframe, blink::WebAnimationCurve::TimingFunctionTypeLinear);
|
| return;
|
|
|
| case TimingFunction::CubicBezierFunction: {
|
| @@ -376,19 +376,19 @@
|
| curve.add(keyframe, cubic->x1(), cubic->y1(), cubic->x2(), cubic->y2());
|
| } else {
|
|
|
| - WebCompositorAnimationCurve::TimingFunctionType easeType;
|
| + blink::WebAnimationCurve::TimingFunctionType easeType;
|
| switch (cubic->subType()) {
|
| case CubicBezierTimingFunction::Ease:
|
| - easeType = WebCompositorAnimationCurve::TimingFunctionTypeEase;
|
| + easeType = blink::WebAnimationCurve::TimingFunctionTypeEase;
|
| break;
|
| case CubicBezierTimingFunction::EaseIn:
|
| - easeType = WebCompositorAnimationCurve::TimingFunctionTypeEaseIn;
|
| + easeType = blink::WebAnimationCurve::TimingFunctionTypeEaseIn;
|
| break;
|
| case CubicBezierTimingFunction::EaseOut:
|
| - easeType = WebCompositorAnimationCurve::TimingFunctionTypeEaseOut;
|
| + easeType = blink::WebAnimationCurve::TimingFunctionTypeEaseOut;
|
| break;
|
| case CubicBezierTimingFunction::EaseInOut:
|
| - easeType = WebCompositorAnimationCurve::TimingFunctionTypeEaseInOut;
|
| + easeType = blink::WebAnimationCurve::TimingFunctionTypeEaseInOut;
|
| break;
|
|
|
| // Custom Bezier are handled seperately.
|
| @@ -412,7 +412,7 @@
|
|
|
| } // namespace anoymous
|
|
|
| -void CompositorAnimationsImpl::addKeyframesToCurve(WebCompositorAnimationCurve& curve, const PropertySpecificKeyframeVector& keyframes, bool reverse)
|
| +void CompositorAnimationsImpl::addKeyframesToCurve(blink::WebAnimationCurve& curve, const PropertySpecificKeyframeVector& keyframes, bool reverse)
|
| {
|
| for (size_t i = 0; i < keyframes.size(); i++) {
|
| RefPtr<TimingFunction> reversedTimingFunction;
|
| @@ -432,27 +432,27 @@
|
| const AnimatableValue* value = keyframes[i]->getAnimatableValue().get();
|
|
|
| switch (curve.type()) {
|
| - case WebCompositorAnimationCurve::AnimationCurveTypeFilter: {
|
| - OwnPtr<WebFilterOperations> ops = adoptPtr(Platform::current()->compositorSupport()->createFilterOperations());
|
| + case blink::WebAnimationCurve::AnimationCurveTypeFilter: {
|
| + OwnPtr<blink::WebFilterOperations> ops = adoptPtr(blink::Platform::current()->compositorSupport()->createFilterOperations());
|
| toWebFilterOperations(toAnimatableFilterOperations(value)->operations(), ops.get());
|
|
|
| - WebFilterKeyframe filterKeyframe(keyframes[i]->offset(), ops.release());
|
| - WebFilterAnimationCurve* filterCurve = static_cast<WebFilterAnimationCurve*>(&curve);
|
| + blink::WebFilterKeyframe filterKeyframe(keyframes[i]->offset(), ops.release());
|
| + blink::WebFilterAnimationCurve* filterCurve = static_cast<blink::WebFilterAnimationCurve*>(&curve);
|
| addKeyframeWithTimingFunction(*filterCurve, filterKeyframe, keyframeTimingFunction);
|
| break;
|
| }
|
| - case WebCompositorAnimationCurve::AnimationCurveTypeFloat: {
|
| - WebFloatKeyframe floatKeyframe(keyframes[i]->offset(), toAnimatableDouble(value)->toDouble());
|
| - WebFloatAnimationCurve* floatCurve = static_cast<WebFloatAnimationCurve*>(&curve);
|
| + case blink::WebAnimationCurve::AnimationCurveTypeFloat: {
|
| + blink::WebFloatKeyframe floatKeyframe(keyframes[i]->offset(), toAnimatableDouble(value)->toDouble());
|
| + blink::WebFloatAnimationCurve* floatCurve = static_cast<blink::WebFloatAnimationCurve*>(&curve);
|
| addKeyframeWithTimingFunction(*floatCurve, floatKeyframe, keyframeTimingFunction);
|
| break;
|
| }
|
| - case WebCompositorAnimationCurve::AnimationCurveTypeTransform: {
|
| - OwnPtr<WebTransformOperations> ops = adoptPtr(Platform::current()->compositorSupport()->createTransformOperations());
|
| + case blink::WebAnimationCurve::AnimationCurveTypeTransform: {
|
| + OwnPtr<blink::WebTransformOperations> ops = adoptPtr(blink::Platform::current()->compositorSupport()->createTransformOperations());
|
| toWebTransformOperations(toAnimatableTransform(value)->transformOperations(), ops.get());
|
|
|
| - WebTransformKeyframe transformKeyframe(keyframes[i]->offset(), ops.release());
|
| - WebTransformAnimationCurve* transformCurve = static_cast<WebTransformAnimationCurve*>(&curve);
|
| + blink::WebTransformKeyframe transformKeyframe(keyframes[i]->offset(), ops.release());
|
| + blink::WebTransformAnimationCurve* transformCurve = static_cast<blink::WebTransformAnimationCurve*>(&curve);
|
| addKeyframeWithTimingFunction(*transformCurve, transformKeyframe, keyframeTimingFunction);
|
| break;
|
| }
|
| @@ -462,7 +462,7 @@
|
| }
|
| }
|
|
|
| -void CompositorAnimationsImpl::getAnimationOnCompositor(const Timing& timing, double startTime, const KeyframeEffectModelBase& effect, Vector<OwnPtr<WebCompositorAnimation> >& animations)
|
| +void CompositorAnimationsImpl::getAnimationOnCompositor(const Timing& timing, double startTime, const KeyframeEffectModelBase& effect, Vector<OwnPtr<blink::WebAnimation> >& animations)
|
| {
|
| ASSERT(animations.isEmpty());
|
| CompositorTiming compositorTiming;
|
| @@ -476,27 +476,27 @@
|
| PropertySpecificKeyframeVector values;
|
| getKeyframeValuesForProperty(&effect, *it, compositorTiming.scaledDuration, compositorTiming.reverse, values);
|
|
|
| - WebCompositorAnimation::TargetProperty targetProperty;
|
| - OwnPtr<WebCompositorAnimationCurve> curve;
|
| + blink::WebAnimation::TargetProperty targetProperty;
|
| + OwnPtr<blink::WebAnimationCurve> curve;
|
| switch (*it) {
|
| case CSSPropertyOpacity: {
|
| - targetProperty = WebCompositorAnimation::TargetPropertyOpacity;
|
| -
|
| - WebFloatAnimationCurve* floatCurve = Platform::current()->compositorSupport()->createFloatAnimationCurve();
|
| + targetProperty = blink::WebAnimation::TargetPropertyOpacity;
|
| +
|
| + blink::WebFloatAnimationCurve* floatCurve = blink::Platform::current()->compositorSupport()->createFloatAnimationCurve();
|
| addKeyframesToCurve(*floatCurve, values, compositorTiming.reverse);
|
| curve = adoptPtr(floatCurve);
|
| break;
|
| }
|
| case CSSPropertyWebkitFilter: {
|
| - targetProperty = WebCompositorAnimation::TargetPropertyFilter;
|
| - WebFilterAnimationCurve* filterCurve = Platform::current()->compositorSupport()->createFilterAnimationCurve();
|
| + targetProperty = blink::WebAnimation::TargetPropertyFilter;
|
| + blink::WebFilterAnimationCurve* filterCurve = blink::Platform::current()->compositorSupport()->createFilterAnimationCurve();
|
| addKeyframesToCurve(*filterCurve, values, compositorTiming.reverse);
|
| curve = adoptPtr(filterCurve);
|
| break;
|
| }
|
| case CSSPropertyTransform: {
|
| - targetProperty = WebCompositorAnimation::TargetPropertyTransform;
|
| - WebTransformAnimationCurve* transformCurve = Platform::current()->compositorSupport()->createTransformAnimationCurve();
|
| + targetProperty = blink::WebAnimation::TargetPropertyTransform;
|
| + blink::WebTransformAnimationCurve* transformCurve = blink::Platform::current()->compositorSupport()->createTransformAnimationCurve();
|
| addKeyframesToCurve(*transformCurve, values, compositorTiming.reverse);
|
| curve = adoptPtr(transformCurve);
|
| break;
|
| @@ -507,7 +507,7 @@
|
| }
|
| ASSERT(curve.get());
|
|
|
| - OwnPtr<WebCompositorAnimation> animation = adoptPtr(Platform::current()->compositorSupport()->createAnimation(*curve, targetProperty));
|
| + OwnPtr<blink::WebAnimation> animation = adoptPtr(blink::Platform::current()->compositorSupport()->createAnimation(*curve, targetProperty));
|
|
|
| if (!std::isnan(startTime))
|
| animation->setStartTime(startTime);
|
|
|