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

Unified Diff: cc/layers/layer.cc

Issue 2758343002: cc: Use Element Id to Record Animation Changes (Closed)
Patch Set: fix for test Created 3 years, 9 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 | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index 223fc65c0c1b7f3d295d643ee26d871de324e14f..1d2663b7e5bd133cbd5ca13793c2b3837b5e91f4 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -1340,79 +1340,6 @@ void Layer::OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset) {
// compositor-driven scrolling.
}
-void Layer::OnIsAnimatingChanged(const PropertyAnimationState& mask,
- const PropertyAnimationState& state) {
- DCHECK(layer_tree_host_);
- PropertyTrees* property_trees = layer_tree_host_->property_trees();
-
- for (int property = TargetProperty::FIRST_TARGET_PROPERTY;
- property <= TargetProperty::LAST_TARGET_PROPERTY; ++property) {
- if (!mask.currently_running[property] &&
- !mask.potentially_animating[property])
- continue;
-
- switch (property) {
- case TargetProperty::TRANSFORM:
- if (TransformNode* transform_node =
- property_trees->transform_tree.UpdateNodeFromOwningLayerId(
- id())) {
- DCHECK_EQ(transform_node->id, transform_tree_index());
- if (mask.currently_running[property])
- transform_node->is_currently_animating =
- state.currently_running[property];
- if (mask.potentially_animating[property]) {
- transform_node->has_potential_animation =
- state.potentially_animating[property];
- if (state.potentially_animating[property]) {
- transform_node->has_only_translation_animations =
- HasOnlyTranslationTransforms();
- } else {
- transform_node->has_only_translation_animations = true;
- }
- property_trees->transform_tree.set_needs_update(true);
- }
- } else {
- DCHECK(property_trees->needs_rebuild)
- << "Attempting to animate non existent transform node";
- }
- break;
- case TargetProperty::OPACITY:
- if (EffectNode* effect_node =
- property_trees->effect_tree.UpdateNodeFromOwningLayerId(id())) {
- if (mask.currently_running[property])
- effect_node->is_currently_animating_opacity =
- state.currently_running[property];
- if (mask.potentially_animating[property]) {
- effect_node->has_potential_opacity_animation =
- state.potentially_animating[property] ||
- OpacityCanAnimateOnImplThread();
- property_trees->effect_tree.set_needs_update(true);
- }
- } else {
- DCHECK(property_trees->needs_rebuild)
- << "Attempting to animate opacity on non existent effect node";
- }
- break;
- case TargetProperty::FILTER:
- if (EffectNode* effect_node =
- property_trees->effect_tree.UpdateNodeFromOwningLayerId(id())) {
- if (mask.currently_running[property])
- effect_node->is_currently_animating_filter =
- state.currently_running[property];
- if (mask.potentially_animating[property])
- effect_node->has_potential_filter_animation =
- state.potentially_animating[property];
- } else {
- DCHECK(property_trees->needs_rebuild)
- << "Attempting to animate filter on non existent effect node";
- }
- break;
- default:
- break;
- }
- }
-}
-
bool Layer::HasTickingAnimationForTesting() const {
return layer_tree_host_
? GetMutatorHost()->HasTickingAnimationForTesting(element_id())
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698