Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: cc/animation/animation_timeline.h

Issue 947033002: CC Animations: Establish AnimationHost, AnimationTimeline and AnimationPlayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CC_ANIMATION_ANIMATION_TIMELINE_H_
6 #define CC_ANIMATION_ANIMATION_TIMELINE_H_
7
8 #include <vector>
9
10 #include "base/memory/ref_counted.h"
11 #include "cc/base/cc_export.h"
12
13 namespace cc {
14
15 class AnimationPlayer;
16 class LayerTreeHost;
17 class LayerTreeMutatorsClient;
18
19 typedef std::vector<scoped_refptr<AnimationPlayer>> AnimationPlayerList;
20
21 class CC_EXPORT AnimationTimeline : public base::RefCounted<AnimationTimeline> {
22 public:
23 static scoped_refptr<AnimationTimeline> Create();
24
25 void AttachPlayer(AnimationPlayer* player);
26 void DetachPlayer(AnimationPlayer* player);
27 AnimationPlayer* GetPlayerById(int player_id) const;
28
29 LayerTreeMutatorsClient* layer_tree_mutators_client() {
30 return layer_tree_mutators_client_;
31 }
32 const LayerTreeMutatorsClient* layer_tree_mutators_client() const {
33 return layer_tree_mutators_client_;
34 }
35 void SetLayerTreeMutatorsClient(LayerTreeMutatorsClient* client);
36
37 void PushPropertiesTo(AnimationTimeline* timeline_impl);
38
39 private:
40 friend class base::RefCounted<AnimationTimeline>;
41
42 AnimationTimeline();
43 virtual ~AnimationTimeline();
44
45 void PushAttachedPlayersToImplThread(AnimationTimeline* timeline) const;
46 void RemoveDetachedPlayersFromImplThread(AnimationTimeline* timeline) const;
47 void PushPropertiesToImplThread(AnimationTimeline* timeline);
48
49 AnimationPlayerList players_;
50 LayerTreeMutatorsClient* layer_tree_mutators_client_;
51
52 DISALLOW_COPY_AND_ASSIGN(AnimationTimeline);
53 };
54
55 } // namespace cc
56
57 #endif // CC_ANIMATION_ANIMATION_TIMELINE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698