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

Side by Side Diff: ui/compositor/layer_animation_sequence.h

Issue 134453004: Use a bitfield to store animatable properties. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix another win build error (signed/unsigned comp). Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « ui/compositor/layer_animation_observer.cc ('k') | ui/compositor/layer_animation_sequence.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 UI_COMPOSITOR_LAYER_ANIMATION_SEQUENCE_H_ 5 #ifndef UI_COMPOSITOR_LAYER_ANIMATION_SEQUENCE_H_
6 #define UI_COMPOSITOR_LAYER_ANIMATION_SEQUENCE_H_ 6 #define UI_COMPOSITOR_LAYER_ANIMATION_SEQUENCE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 void ProgressToEnd(LayerAnimationDelegate* delegate); 74 void ProgressToEnd(LayerAnimationDelegate* delegate);
75 75
76 // Sets the target value to the value that would have been set had 76 // Sets the target value to the value that would have been set had
77 // the sequence completed. Does nothing if the sequence is cyclic. 77 // the sequence completed. Does nothing if the sequence is cyclic.
78 void GetTargetValue(LayerAnimationElement::TargetValue* target) const; 78 void GetTargetValue(LayerAnimationElement::TargetValue* target) const;
79 79
80 // Aborts the given animation. 80 // Aborts the given animation.
81 void Abort(LayerAnimationDelegate* delegate); 81 void Abort(LayerAnimationDelegate* delegate);
82 82
83 // All properties modified by the sequence. 83 // All properties modified by the sequence.
84 const LayerAnimationElement::AnimatableProperties& properties() const { 84 LayerAnimationElement::AnimatableProperties properties() const {
85 return properties_; 85 return properties_;
86 } 86 }
87 87
88 // Adds an element to the sequence. The sequences takes ownership of this 88 // Adds an element to the sequence. The sequences takes ownership of this
89 // element. 89 // element.
90 void AddElement(LayerAnimationElement* element); 90 void AddElement(LayerAnimationElement* element);
91 91
92 // Sequences can be looped indefinitely. 92 // Sequences can be looped indefinitely.
93 void set_is_cyclic(bool is_cyclic) { is_cyclic_ = is_cyclic; } 93 void set_is_cyclic(bool is_cyclic) { is_cyclic_ = is_cyclic; }
94 bool is_cyclic() const { return is_cyclic_; } 94 bool is_cyclic() const { return is_cyclic_; }
95 95
96 // Returns true if this sequence has at least one element conflicting with a 96 // Returns true if this sequence has at least one element conflicting with a
97 // property in |other|. 97 // property in |other|.
98 bool HasConflictingProperty( 98 bool HasConflictingProperty(
99 const LayerAnimationElement::AnimatableProperties& other) const; 99 LayerAnimationElement::AnimatableProperties other) const;
100 100
101 // Returns true if the first element animates on the compositor thread. 101 // Returns true if the first element animates on the compositor thread.
102 bool IsFirstElementThreaded() const; 102 bool IsFirstElementThreaded() const;
103 103
104 // Used to identify groups of sequences that are supposed to start together. 104 // Used to identify groups of sequences that are supposed to start together.
105 // Once started, used to identify the sequence that owns a particular 105 // Once started, used to identify the sequence that owns a particular
106 // threaded animation. 106 // threaded animation.
107 int animation_group_id() const { return animation_group_id_; } 107 int animation_group_id() const { return animation_group_id_; }
108 void set_animation_group_id(int id) { animation_group_id_ = id; } 108 void set_animation_group_id(int id) { animation_group_id_ = id; }
109 109
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 double last_progressed_fraction_; 183 double last_progressed_fraction_;
184 184
185 base::WeakPtrFactory<LayerAnimationSequence> weak_ptr_factory_; 185 base::WeakPtrFactory<LayerAnimationSequence> weak_ptr_factory_;
186 186
187 DISALLOW_COPY_AND_ASSIGN(LayerAnimationSequence); 187 DISALLOW_COPY_AND_ASSIGN(LayerAnimationSequence);
188 }; 188 };
189 189
190 } // namespace ui 190 } // namespace ui
191 191
192 #endif // UI_COMPOSITOR_LAYER_ANIMATION_SEQUENCE_H_ 192 #endif // UI_COMPOSITOR_LAYER_ANIMATION_SEQUENCE_H_
OLDNEW
« no previous file with comments | « ui/compositor/layer_animation_observer.cc ('k') | ui/compositor/layer_animation_sequence.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698