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

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

Issue 2049063002: Revert of Use element id's for animations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « cc/BUILD.gn ('k') | cc/animation/animation_host.cc » ('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_HOST_H_ 5 #ifndef CC_ANIMATION_ANIMATION_HOST_H_
6 #define CC_ANIMATION_ANIMATION_HOST_H_ 6 #define CC_ANIMATION_ANIMATION_HOST_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <unordered_map> 9 #include <unordered_map>
10 10
(...skipping 27 matching lines...) Expand all
38 // Specifically, it owns all the AnimationTimelines objects. 38 // Specifically, it owns all the AnimationTimelines objects.
39 // There is just one AnimationHost for LayerTreeHost on main renderer thread 39 // There is just one AnimationHost for LayerTreeHost on main renderer thread
40 // and just one AnimationHost for LayerTreeHostImpl on impl thread. 40 // and just one AnimationHost for LayerTreeHostImpl on impl thread.
41 // We synchronize them during the commit process in a one-way data flow process 41 // We synchronize them during the commit process in a one-way data flow process
42 // (PushPropertiesTo). 42 // (PushPropertiesTo).
43 // An AnimationHost talks to its correspondent LayerTreeHost via 43 // An AnimationHost talks to its correspondent LayerTreeHost via
44 // LayerTreeMutatorsClient interface. 44 // LayerTreeMutatorsClient interface.
45 class CC_EXPORT AnimationHost { 45 class CC_EXPORT AnimationHost {
46 public: 46 public:
47 using ElementToAnimationsMap = 47 using ElementToAnimationsMap =
48 std::unordered_map<ElementId, 48 std::unordered_map<ElementId, scoped_refptr<ElementAnimations>>;
49 scoped_refptr<ElementAnimations>,
50 ElementIdHash>;
51 49
52 static std::unique_ptr<AnimationHost> Create(ThreadInstance thread_instance); 50 static std::unique_ptr<AnimationHost> Create(ThreadInstance thread_instance);
53 ~AnimationHost(); 51 ~AnimationHost();
54 52
55 void AddAnimationTimeline(scoped_refptr<AnimationTimeline> timeline); 53 void AddAnimationTimeline(scoped_refptr<AnimationTimeline> timeline);
56 void RemoveAnimationTimeline(scoped_refptr<AnimationTimeline> timeline); 54 void RemoveAnimationTimeline(scoped_refptr<AnimationTimeline> timeline);
57 AnimationTimeline* GetTimelineById(int timeline_id) const; 55 AnimationTimeline* GetTimelineById(int timeline_id) const;
58 56
59 void ClearTimelines(); 57 void ClearTimelines();
60 58
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 195
198 bool supports_scroll_animations_; 196 bool supports_scroll_animations_;
199 bool animation_waiting_for_deletion_; 197 bool animation_waiting_for_deletion_;
200 198
201 DISALLOW_COPY_AND_ASSIGN(AnimationHost); 199 DISALLOW_COPY_AND_ASSIGN(AnimationHost);
202 }; 200 };
203 201
204 } // namespace cc 202 } // namespace cc
205 203
206 #endif // CC_ANIMATION_ANIMATION_HOST_H_ 204 #endif // CC_ANIMATION_ANIMATION_HOST_H_
OLDNEW
« no previous file with comments | « cc/BUILD.gn ('k') | cc/animation/animation_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698