OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CC_ANIMATION_ANIMATION_EVENTS_H_ | 5 #ifndef CC_ANIMATION_ANIMATION_EVENTS_H_ |
6 #define CC_ANIMATION_ANIMATION_EVENTS_H_ | 6 #define CC_ANIMATION_ANIMATION_EVENTS_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "cc/animation/animation.h" | 11 #include "cc/animation/animation.h" |
12 #include "cc/animation/animation_curve.h" | 12 #include "cc/animation/animation_curve.h" |
13 #include "cc/base/cc_export.h" | 13 #include "cc/base/cc_export.h" |
14 #include "cc/output/filter_operations.h" | 14 #include "cc/output/filter_operations.h" |
| 15 #include "cc/trees/mutator_host_client.h" |
15 #include "ui/gfx/transform.h" | 16 #include "ui/gfx/transform.h" |
16 | 17 |
17 namespace cc { | 18 namespace cc { |
18 | 19 |
19 struct CC_EXPORT AnimationEvent { | 20 struct CC_EXPORT AnimationEvent { |
20 enum Type { STARTED, FINISHED, ABORTED, PROPERTY_UPDATE, TAKEOVER }; | 21 enum Type { STARTED, FINISHED, ABORTED, PROPERTY_UPDATE, TAKEOVER }; |
21 | 22 |
22 AnimationEvent(Type type, | 23 AnimationEvent(Type type, |
23 int layer_id, | 24 ElementId element_id, |
24 int group_id, | 25 int group_id, |
25 TargetProperty::Type target_property, | 26 TargetProperty::Type target_property, |
26 base::TimeTicks monotonic_time); | 27 base::TimeTicks monotonic_time); |
27 | 28 |
28 AnimationEvent(const AnimationEvent& other); | 29 AnimationEvent(const AnimationEvent& other); |
29 AnimationEvent& operator=(const AnimationEvent& other); | 30 AnimationEvent& operator=(const AnimationEvent& other); |
30 | 31 |
31 ~AnimationEvent(); | 32 ~AnimationEvent(); |
32 | 33 |
33 Type type; | 34 Type type; |
34 int layer_id; | 35 ElementId element_id; |
35 int group_id; | 36 int group_id; |
36 TargetProperty::Type target_property; | 37 TargetProperty::Type target_property; |
37 base::TimeTicks monotonic_time; | 38 base::TimeTicks monotonic_time; |
38 bool is_impl_only; | 39 bool is_impl_only; |
39 float opacity; | 40 float opacity; |
40 gfx::Transform transform; | 41 gfx::Transform transform; |
41 FilterOperations filters; | 42 FilterOperations filters; |
42 | 43 |
43 // For continuing a scroll offset animation on the main thread. | 44 // For continuing a scroll offset animation on the main thread. |
44 double animation_start_time; | 45 double animation_start_time; |
45 std::unique_ptr<AnimationCurve> curve; | 46 std::unique_ptr<AnimationCurve> curve; |
46 }; | 47 }; |
47 | 48 |
48 class CC_EXPORT AnimationEvents { | 49 class CC_EXPORT AnimationEvents { |
49 public: | 50 public: |
50 AnimationEvents(); | 51 AnimationEvents(); |
51 ~AnimationEvents(); | 52 ~AnimationEvents(); |
52 | 53 |
53 std::vector<AnimationEvent> events_; | 54 std::vector<AnimationEvent> events_; |
54 }; | 55 }; |
55 | 56 |
56 } // namespace cc | 57 } // namespace cc |
57 | 58 |
58 #endif // CC_ANIMATION_ANIMATION_EVENTS_H_ | 59 #endif // CC_ANIMATION_ANIMATION_EVENTS_H_ |
OLD | NEW |