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

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

Issue 1973083002: Use element id's for animations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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, scoped_refptr<ElementAnimations>>; 48 std::unordered_map<ElementId,
49 scoped_refptr<ElementAnimations>,
50 ElementIdHash>;
49 51
50 static std::unique_ptr<AnimationHost> CreateMainInstance(); 52 static std::unique_ptr<AnimationHost> CreateMainInstance();
51 static std::unique_ptr<AnimationHost> CreateForTesting( 53 static std::unique_ptr<AnimationHost> CreateForTesting(
52 ThreadInstance thread_instance); 54 ThreadInstance thread_instance);
53 std::unique_ptr<AnimationHost> CreateImplInstance( 55 std::unique_ptr<AnimationHost> CreateImplInstance(
54 bool supports_impl_scrolling) const; 56 bool supports_impl_scrolling) const;
55 ~AnimationHost(); 57 ~AnimationHost();
56 58
57 void AddAnimationTimeline(scoped_refptr<AnimationTimeline> timeline); 59 void AddAnimationTimeline(scoped_refptr<AnimationTimeline> timeline);
58 void RemoveAnimationTimeline(scoped_refptr<AnimationTimeline> timeline); 60 void RemoveAnimationTimeline(scoped_refptr<AnimationTimeline> timeline);
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 201
200 bool supports_scroll_animations_; 202 bool supports_scroll_animations_;
201 bool animation_waiting_for_deletion_; 203 bool animation_waiting_for_deletion_;
202 204
203 DISALLOW_COPY_AND_ASSIGN(AnimationHost); 205 DISALLOW_COPY_AND_ASSIGN(AnimationHost);
204 }; 206 };
205 207
206 } // namespace cc 208 } // namespace cc
207 209
208 #endif // CC_ANIMATION_ANIMATION_HOST_H_ 210 #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