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

Unified Diff: ui/compositor/layer_animation_observer.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/compositor/layer_animation_element_unittest.cc ('k') | ui/compositor/layer_animation_sequence.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer_animation_observer.cc
diff --git a/ui/compositor/layer_animation_observer.cc b/ui/compositor/layer_animation_observer.cc
index 88db4c65ec2fc5ba7f962e3031aaa1fb9899a8d3..658a835ddfa553198eb700b2c13ac3fa1c42c668 100644
--- a/ui/compositor/layer_animation_observer.cc
+++ b/ui/compositor/layer_animation_observer.cc
@@ -140,11 +140,16 @@ void ImplicitAnimationObserver::CheckCompleted() {
void ImplicitAnimationObserver::UpdatePropertyAnimationStatus(
LayerAnimationSequence* sequence,
AnimationStatus status) {
- const LayerAnimationElement::AnimatableProperties& properties =
+ LayerAnimationElement::AnimatableProperties properties =
sequence->properties();
- for (LayerAnimationElement::AnimatableProperties::const_iterator i =
- properties.begin(); i != properties.end(); ++i) {
- property_animation_status_[(*i)] = status;
+ for (unsigned i = LayerAnimationElement::FIRST_PROPERTY;
+ i != LayerAnimationElement::SENTINEL;
+ i = i << 1) {
+ if (i & properties) {
+ LayerAnimationElement::AnimatableProperty property =
+ static_cast<LayerAnimationElement::AnimatableProperty>(i);
+ property_animation_status_[property] = status;
+ }
}
}
« no previous file with comments | « ui/compositor/layer_animation_element_unittest.cc ('k') | ui/compositor/layer_animation_sequence.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698