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

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

Issue 2291463003: Revert "CC Animation: Introduce some dirty flags to optimize PushProperties on commit" (Closed)
Patch Set: Created 4 years, 3 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/animation/animation_player_unittest.cc ('k') | cc/animation/animation_timeline.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_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
(...skipping 28 matching lines...) Expand all
39 39
40 void AttachPlayer(scoped_refptr<AnimationPlayer> player); 40 void AttachPlayer(scoped_refptr<AnimationPlayer> player);
41 void DetachPlayer(scoped_refptr<AnimationPlayer> player); 41 void DetachPlayer(scoped_refptr<AnimationPlayer> player);
42 42
43 void ClearPlayers(); 43 void ClearPlayers();
44 44
45 void PushPropertiesTo(AnimationTimeline* timeline_impl); 45 void PushPropertiesTo(AnimationTimeline* timeline_impl);
46 46
47 AnimationPlayer* GetPlayerById(int player_id) const; 47 AnimationPlayer* GetPlayerById(int player_id) const;
48 48
49 void SetNeedsPushProperties();
50 bool needs_push_properties() const { return needs_push_properties_; }
51
52 private: 49 private:
53 friend class base::RefCounted<AnimationTimeline>; 50 friend class base::RefCounted<AnimationTimeline>;
54 51
55 explicit AnimationTimeline(int id); 52 explicit AnimationTimeline(int id);
56 virtual ~AnimationTimeline(); 53 virtual ~AnimationTimeline();
57 54
58 void PushAttachedPlayersToImplThread(AnimationTimeline* timeline) const; 55 void PushAttachedPlayersToImplThread(AnimationTimeline* timeline) const;
59 void RemoveDetachedPlayersFromImplThread(AnimationTimeline* timeline) const; 56 void RemoveDetachedPlayersFromImplThread(AnimationTimeline* timeline) const;
60 void PushPropertiesToImplThread(AnimationTimeline* timeline); 57 void PushPropertiesToImplThread(AnimationTimeline* timeline);
61 58
62 void ErasePlayer(scoped_refptr<AnimationPlayer> player); 59 void ErasePlayer(scoped_refptr<AnimationPlayer> player);
63 60
64 // A list of all players which this timeline owns. 61 // A list of all players which this timeline owns.
65 using IdToPlayerMap = std::unordered_map<int, scoped_refptr<AnimationPlayer>>; 62 using IdToPlayerMap = std::unordered_map<int, scoped_refptr<AnimationPlayer>>;
66 IdToPlayerMap id_to_player_map_; 63 IdToPlayerMap id_to_player_map_;
67 64
68 int id_; 65 int id_;
69 AnimationHost* animation_host_; 66 AnimationHost* animation_host_;
70 bool needs_push_properties_;
71 67
72 // Impl-only AnimationTimeline has no main thread instance and lives on 68 // Impl-only AnimationTimeline has no main thread instance and lives on
73 // it's own. 69 // it's own.
74 bool is_impl_only_; 70 bool is_impl_only_;
75 71
76 DISALLOW_COPY_AND_ASSIGN(AnimationTimeline); 72 DISALLOW_COPY_AND_ASSIGN(AnimationTimeline);
77 }; 73 };
78 74
79 } // namespace cc 75 } // namespace cc
80 76
81 #endif // CC_ANIMATION_ANIMATION_TIMELINE_H_ 77 #endif // CC_ANIMATION_ANIMATION_TIMELINE_H_
OLDNEW
« no previous file with comments | « cc/animation/animation_player_unittest.cc ('k') | cc/animation/animation_timeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698