1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef WebCompositorAnimation_h
6 #define WebCompositorAnimation_h
10 // A compositor driven animation.
11 class WebCompositorAnimation
{
14 TargetPropertyTransform
= 0,
15 TargetPropertyOpacity
,
17 TargetPropertyScrollOffset
24 DirectionAlternateReverse
34 virtual ~WebCompositorAnimation() { }
36 // An id must be unique.
38 virtual int group() = 0;
40 virtual TargetProperty
targetProperty() const = 0;
42 // This is the number of times that the animation will play. If this
43 // value is zero the animation will not play. If it is negative, then
44 // the animation will loop indefinitely.
45 virtual double iterations() const = 0;
46 virtual void setIterations(double) = 0;
48 virtual double startTime() const = 0;
49 virtual void setStartTime(double monotonicTime
) = 0;
51 virtual double timeOffset() const = 0;
52 virtual void setTimeOffset(double monotonicTime
) = 0;
54 virtual Direction
direction() const = 0;
55 virtual void setDirection(Direction
) = 0;
57 virtual double playbackRate() const = 0;
58 virtual void setPlaybackRate(double) = 0;
60 virtual FillMode
fillMode() const = 0;
61 virtual void setFillMode(FillMode
) = 0;
63 virtual double iterationStart() const = 0;
64 virtual void setIterationStart(double) = 0;
69 #endif // WebCompositorAnimation_h