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

Side by Side Diff: cc/animation/animation_player.cc

Issue 2883713002: Document some transform node animation fields. (Closed)
Patch Set: Fix comment on node_and_ancestors_are_animated_or_invertible. Created 3 years, 7 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
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 #include "cc/animation/animation_player.h" 5 #include "cc/animation/animation_player.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "cc/animation/animation_delegate.h" 10 #include "cc/animation/animation_delegate.h"
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 return false; 1000 return false;
1001 *max_scale = std::max(*max_scale, animation_scale); 1001 *max_scale = std::max(*max_scale, animation_scale);
1002 } 1002 }
1003 1003
1004 return true; 1004 return true;
1005 } 1005 }
1006 1006
1007 bool AnimationPlayer::IsPotentiallyAnimatingProperty( 1007 bool AnimationPlayer::IsPotentiallyAnimatingProperty(
1008 TargetProperty::Type target_property, 1008 TargetProperty::Type target_property,
1009 ElementListType list_type) const { 1009 ElementListType list_type) const {
1010 // TODO(wkorman): Consider refactoring this to share implementation
1011 // with IsCurrentlyAnimatingProperty. The only difference is
1012 // whether we consider InEffect(last_tick_time_) on each.
1010 for (size_t i = 0; i < animations_.size(); ++i) { 1013 for (size_t i = 0; i < animations_.size(); ++i) {
1011 if (!animations_[i]->is_finished() && 1014 if (!animations_[i]->is_finished() &&
1012 animations_[i]->target_property() == target_property) { 1015 animations_[i]->target_property() == target_property) {
1013 if ((list_type == ElementListType::ACTIVE && 1016 if ((list_type == ElementListType::ACTIVE &&
1014 animations_[i]->affects_active_elements()) || 1017 animations_[i]->affects_active_elements()) ||
1015 (list_type == ElementListType::PENDING && 1018 (list_type == ElementListType::PENDING &&
1016 animations_[i]->affects_pending_elements())) 1019 animations_[i]->affects_pending_elements()))
1017 return true; 1020 return true;
1018 } 1021 }
1019 } 1022 }
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1205 if (current_impl) 1208 if (current_impl)
1206 animations_[i]->PushPropertiesTo(current_impl); 1209 animations_[i]->PushPropertiesTo(current_impl);
1207 } 1210 }
1208 1211
1209 animation_player_impl->scroll_offset_animation_was_interrupted_ = 1212 animation_player_impl->scroll_offset_animation_was_interrupted_ =
1210 scroll_offset_animation_was_interrupted_; 1213 scroll_offset_animation_was_interrupted_;
1211 scroll_offset_animation_was_interrupted_ = false; 1214 scroll_offset_animation_was_interrupted_ = false;
1212 } 1215 }
1213 1216
1214 } // namespace cc 1217 } // namespace cc
OLDNEW
« no previous file with comments | « cc/README.md ('k') | cc/trees/property_tree.h » ('j') | cc/trees/property_tree.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698