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

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

Issue 2189813002: ElementAnimations should hold an ObservableList of AnimationPlayers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix windows bot Created 4 years, 4 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
« no previous file with comments | « no previous file | cc/animation/element_animations.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_PLAYER_H_ 5 #ifndef CC_ANIMATION_ANIMATION_PLAYER_H_
6 #define CC_ANIMATION_ANIMATION_PLAYER_H_ 6 #define CC_ANIMATION_ANIMATION_PLAYER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/containers/linked_list.h"
11 #include "base/macros.h" 10 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
13 #include "base/time/time.h" 12 #include "base/time/time.h"
14 #include "cc/animation/animation.h" 13 #include "cc/animation/animation.h"
15 #include "cc/animation/animation_curve.h" 14 #include "cc/animation/animation_curve.h"
16 #include "cc/animation/element_animations.h" 15 #include "cc/animation/element_animations.h"
17 #include "cc/base/cc_export.h" 16 #include "cc/base/cc_export.h"
18 17
19 namespace cc { 18 namespace cc {
20 19
21 class AnimationDelegate; 20 class AnimationDelegate;
22 class AnimationHost; 21 class AnimationHost;
23 class AnimationTimeline; 22 class AnimationTimeline;
24 class ElementAnimations; 23 class ElementAnimations;
25 24
26 // An AnimationPlayer owns all animations to be run on particular CC Layer. 25 // An AnimationPlayer owns all animations to be run on particular CC Layer.
27 // Multiple AnimationPlayers can be attached to one layer. In this case, 26 // Multiple AnimationPlayers can be attached to one layer. In this case,
28 // they share common ElementAnimations so the 27 // they share common ElementAnimations so the
29 // ElementAnimations-to-Layer relationship is 1:1. 28 // ElementAnimations-to-Layer relationship is 1:1.
30 // For now, the blink logic is responsible for handling of conflicting 29 // For now, the blink logic is responsible for handling of conflicting
31 // same-property animations. 30 // same-property animations.
32 // Each AnimationPlayer has its copy on the impl thread. 31 // Each AnimationPlayer has its copy on the impl thread.
33 // This is a CC counterpart for blink::AnimationPlayer (in 1:1 relationship). 32 // This is a CC counterpart for blink::AnimationPlayer (in 1:1 relationship).
34 class CC_EXPORT AnimationPlayer : public base::RefCounted<AnimationPlayer>, 33 class CC_EXPORT AnimationPlayer : public base::RefCounted<AnimationPlayer> {
35 public base::LinkNode<AnimationPlayer> {
36 public: 34 public:
37 static scoped_refptr<AnimationPlayer> Create(int id); 35 static scoped_refptr<AnimationPlayer> Create(int id);
38 scoped_refptr<AnimationPlayer> CreateImplInstance() const; 36 scoped_refptr<AnimationPlayer> CreateImplInstance() const;
39 37
40 int id() const { return id_; } 38 int id() const { return id_; }
41 ElementId element_id() const { return element_id_; } 39 ElementId element_id() const { return element_id_; }
42 40
43 // Parent AnimationHost. AnimationPlayer can be detached from 41 // Parent AnimationHost. AnimationPlayer can be detached from
44 // AnimationTimeline. 42 // AnimationTimeline.
45 AnimationHost* animation_host() { return animation_host_; } 43 AnimationHost* animation_host() { return animation_host_; }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 119
122 int id_; 120 int id_;
123 ElementId element_id_; 121 ElementId element_id_;
124 122
125 DISALLOW_COPY_AND_ASSIGN(AnimationPlayer); 123 DISALLOW_COPY_AND_ASSIGN(AnimationPlayer);
126 }; 124 };
127 125
128 } // namespace cc 126 } // namespace cc
129 127
130 #endif // CC_ANIMATION_ANIMATION_PLAYER_H_ 128 #endif // CC_ANIMATION_ANIMATION_PLAYER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/animation/element_animations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698