OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_TIMELINE_H_ | 5 #ifndef CC_ANIMATION_ANIMATION_TIMELINE_H_ |
6 #define CC_ANIMATION_ANIMATION_TIMELINE_H_ | 6 #define CC_ANIMATION_ANIMATION_TIMELINE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <unordered_map> | 9 #include <unordered_map> |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "cc/base/cc_export.h" | 13 #include "cc/animation/animation_export.h" |
14 | 14 |
15 namespace cc { | 15 namespace cc { |
16 | 16 |
17 class AnimationHost; | 17 class AnimationHost; |
18 class AnimationPlayer; | 18 class AnimationPlayer; |
19 | 19 |
20 // An AnimationTimeline owns a group of AnimationPlayers. | 20 // An AnimationTimeline owns a group of AnimationPlayers. |
21 // This is a cc counterpart for blink::AnimationTimeline (in 1:1 relationship). | 21 // This is a cc counterpart for blink::AnimationTimeline (in 1:1 relationship). |
22 // Each AnimationTimeline and its AnimationPlayers have their copies on | 22 // Each AnimationTimeline and its AnimationPlayers have their copies on |
23 // the impl thread. We synchronize main thread and impl thread instances | 23 // the impl thread. We synchronize main thread and impl thread instances |
24 // using integer IDs. | 24 // using integer IDs. |
25 class CC_EXPORT AnimationTimeline : public base::RefCounted<AnimationTimeline> { | 25 class CC_ANIMATION_EXPORT AnimationTimeline |
| 26 : public base::RefCounted<AnimationTimeline> { |
26 public: | 27 public: |
27 static scoped_refptr<AnimationTimeline> Create(int id); | 28 static scoped_refptr<AnimationTimeline> Create(int id); |
28 scoped_refptr<AnimationTimeline> CreateImplInstance() const; | 29 scoped_refptr<AnimationTimeline> CreateImplInstance() const; |
29 | 30 |
30 int id() const { return id_; } | 31 int id() const { return id_; } |
31 | 32 |
32 // Parent AnimationHost. | 33 // Parent AnimationHost. |
33 AnimationHost* animation_host() { return animation_host_; } | 34 AnimationHost* animation_host() { return animation_host_; } |
34 const AnimationHost* animation_host() const { return animation_host_; } | 35 const AnimationHost* animation_host() const { return animation_host_; } |
35 void SetAnimationHost(AnimationHost* animation_host); | 36 void SetAnimationHost(AnimationHost* animation_host); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 // Impl-only AnimationTimeline has no main thread instance and lives on | 73 // Impl-only AnimationTimeline has no main thread instance and lives on |
73 // it's own. | 74 // it's own. |
74 bool is_impl_only_; | 75 bool is_impl_only_; |
75 | 76 |
76 DISALLOW_COPY_AND_ASSIGN(AnimationTimeline); | 77 DISALLOW_COPY_AND_ASSIGN(AnimationTimeline); |
77 }; | 78 }; |
78 | 79 |
79 } // namespace cc | 80 } // namespace cc |
80 | 81 |
81 #endif // CC_ANIMATION_ANIMATION_TIMELINE_H_ | 82 #endif // CC_ANIMATION_ANIMATION_TIMELINE_H_ |
OLD | NEW |