OLD | NEW |
---|---|
(Empty) | |
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. | |
4 | |
5 #ifndef WebCompositorAnimation_h | |
6 #define WebCompositorAnimation_h | |
7 | |
8 #include "WebCommon.h" | |
9 #include "WebNonCopyable.h" | |
10 #include "WebPrivateOwnPtr.h" | |
11 | |
12 #if BLINK_IMPLEMENTATION | |
13 #include "wtf/Forward.h" | |
14 #endif | |
15 | |
16 #define WebCompositorAnimation WebCompositorAnimation | |
Ian Vollick
2014/07/24 13:23:34
Delete this, pls.
samli
2014/07/25 01:34:32
Done.
| |
17 | |
18 namespace blink { | |
19 class CCActiveAnimation; | |
20 } | |
21 | |
22 namespace blink { | |
23 | |
24 class WebCompositorAnimationCurve; | |
25 | |
26 // A compositor driven animation. | |
27 class WebCompositorAnimation { | |
28 public: | |
29 enum TargetProperty { | |
30 TargetPropertyTransform = 0, | |
31 TargetPropertyOpacity, | |
32 TargetPropertyFilter, | |
33 TargetPropertyScrollOffset | |
34 }; | |
35 | |
36 virtual ~WebCompositorAnimation() { } | |
37 | |
38 // An id is effectively the animation's name, and it is not unique. | |
39 virtual int id() = 0; | |
40 | |
41 virtual TargetProperty targetProperty() const = 0; | |
42 | |
43 // This is the number of times that the animation will play. If this | |
44 // value is zero the animation will not play. If it is negative, then | |
45 // the animation will loop indefinitely. | |
46 virtual int iterations() const = 0; | |
47 virtual void setIterations(int) = 0; | |
48 | |
49 virtual double startTime() const = 0; | |
50 virtual void setStartTime(double monotonicTime) = 0; | |
51 | |
52 virtual double timeOffset() const = 0; | |
53 virtual void setTimeOffset(double monotonicTime) = 0; | |
54 | |
55 // If alternatesDirection is true, on odd numbered iterations we reverse the curve. | |
56 virtual bool alternatesDirection() const = 0; | |
57 virtual void setAlternatesDirection(bool) = 0; | |
58 }; | |
59 | |
60 } // namespace blink | |
61 | |
62 #endif // WebCompositorAnimation_h | |
OLD | NEW |