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
8 #define WEB_ANIMATION_SUPPORTS_FILL_MODE 1
12 // A compositor driven animation.
13 class WebCompositorAnimation {
16 TargetPropertyTransform = 0,
17 TargetPropertyOpacity,
19 TargetPropertyScrollOffset
26 DirectionAlternateReverse
36 virtual ~WebCompositorAnimation() { }
38 // An id is effectively the animation's name, and it is not unique.
40 virtual int group() = 0;
42 virtual TargetProperty targetProperty() const = 0;
44 // This is the number of times that the animation will play. If this
45 // value is zero the animation will not play. If it is negative, then
46 // the animation will loop indefinitely.
47 virtual double iterations() const = 0;
48 virtual void setIterations(double) = 0;
50 virtual double startTime() const = 0;
51 virtual void setStartTime(double monotonicTime) = 0;
53 virtual double timeOffset() const = 0;
54 virtual void setTimeOffset(double monotonicTime) = 0;
56 virtual Direction direction() const = 0;
57 virtual void setDirection(Direction) = 0;
59 virtual double playbackRate() const = 0;
60 virtual void setPlaybackRate(double) = 0;
62 virtual FillMode fillMode() const = 0;
63 virtual void setFillMode(FillMode) = 0;
65 virtual double iterationStart() const = 0;
66 virtual void setIterationStart(double) = 0;
71 #endif // WebCompositorAnimation_h