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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 1921583003: CC Animation: Let MutatorHostClient deals with elements instead of layers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@elementid
Patch Set: Rename methods in ElementAnimations Created 4 years, 8 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/trees/layer_tree_host_unittest_animation.cc ('k') | cc/trees/mutator_host_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 06b34d3ecc154755d2a71cd9aeb65533a2cc5318..9497e90d3f84fbecb5306b5897cf6f3446349930 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -1017,16 +1017,16 @@ bool LayerTreeImpl::LayerNeedsPushPropertiesForTesting(LayerImpl* layer) {
void LayerTreeImpl::RegisterLayer(LayerImpl* layer) {
DCHECK(!LayerById(layer->id()));
layer_id_map_[layer->id()] = layer;
- layer_tree_host_impl_->animation_host()->RegisterLayer(
+ layer_tree_host_impl_->animation_host()->RegisterElement(
layer->id(),
- IsActiveTree() ? LayerTreeType::ACTIVE : LayerTreeType::PENDING);
+ IsActiveTree() ? ElementListType::ACTIVE : ElementListType::PENDING);
}
void LayerTreeImpl::UnregisterLayer(LayerImpl* layer) {
DCHECK(LayerById(layer->id()));
- layer_tree_host_impl_->animation_host()->UnregisterLayer(
+ layer_tree_host_impl_->animation_host()->UnregisterElement(
layer->id(),
- IsActiveTree() ? LayerTreeType::ACTIVE : LayerTreeType::PENDING);
+ IsActiveTree() ? ElementListType::ACTIVE : ElementListType::PENDING);
layer_id_map_.erase(layer->id());
DCHECK_NE(root_layer_, layer);
}
@@ -1935,48 +1935,48 @@ LayerTreeImpl::TakePendingPageScaleAnimation() {
}
bool LayerTreeImpl::IsAnimatingFilterProperty(const LayerImpl* layer) const {
- LayerTreeType tree_type =
- IsActiveTree() ? LayerTreeType::ACTIVE : LayerTreeType::PENDING;
+ ElementListType list_type =
+ IsActiveTree() ? ElementListType::ACTIVE : ElementListType::PENDING;
return layer_tree_host_impl_->animation_host()->IsAnimatingFilterProperty(
- layer->id(), tree_type);
+ layer->id(), list_type);
}
bool LayerTreeImpl::IsAnimatingOpacityProperty(const LayerImpl* layer) const {
- LayerTreeType tree_type =
- IsActiveTree() ? LayerTreeType::ACTIVE : LayerTreeType::PENDING;
+ ElementListType list_type =
+ IsActiveTree() ? ElementListType::ACTIVE : ElementListType::PENDING;
return layer_tree_host_impl_->animation_host()->IsAnimatingOpacityProperty(
- layer->id(), tree_type);
+ layer->id(), list_type);
}
bool LayerTreeImpl::IsAnimatingTransformProperty(const LayerImpl* layer) const {
- LayerTreeType tree_type =
- IsActiveTree() ? LayerTreeType::ACTIVE : LayerTreeType::PENDING;
+ ElementListType list_type =
+ IsActiveTree() ? ElementListType::ACTIVE : ElementListType::PENDING;
return layer_tree_host_impl_->animation_host()->IsAnimatingTransformProperty(
- layer->id(), tree_type);
+ layer->id(), list_type);
}
bool LayerTreeImpl::HasPotentiallyRunningFilterAnimation(
const LayerImpl* layer) const {
- LayerTreeType tree_type =
- IsActiveTree() ? LayerTreeType::ACTIVE : LayerTreeType::PENDING;
+ ElementListType list_type =
+ IsActiveTree() ? ElementListType::ACTIVE : ElementListType::PENDING;
return layer_tree_host_impl_->animation_host()
- ->HasPotentiallyRunningFilterAnimation(layer->id(), tree_type);
+ ->HasPotentiallyRunningFilterAnimation(layer->id(), list_type);
}
bool LayerTreeImpl::HasPotentiallyRunningOpacityAnimation(
const LayerImpl* layer) const {
- LayerTreeType tree_type =
- IsActiveTree() ? LayerTreeType::ACTIVE : LayerTreeType::PENDING;
+ ElementListType list_type =
+ IsActiveTree() ? ElementListType::ACTIVE : ElementListType::PENDING;
return layer_tree_host_impl_->animation_host()
- ->HasPotentiallyRunningOpacityAnimation(layer->id(), tree_type);
+ ->HasPotentiallyRunningOpacityAnimation(layer->id(), list_type);
}
bool LayerTreeImpl::HasPotentiallyRunningTransformAnimation(
const LayerImpl* layer) const {
- LayerTreeType tree_type =
- IsActiveTree() ? LayerTreeType::ACTIVE : LayerTreeType::PENDING;
+ ElementListType list_type =
+ IsActiveTree() ? ElementListType::ACTIVE : ElementListType::PENDING;
return layer_tree_host_impl_->animation_host()
- ->HasPotentiallyRunningTransformAnimation(layer->id(), tree_type);
+ ->HasPotentiallyRunningTransformAnimation(layer->id(), list_type);
}
bool LayerTreeImpl::HasAnyAnimationTargetingProperty(
@@ -2015,28 +2015,28 @@ bool LayerTreeImpl::AnimationsPreserveAxisAlignment(
}
bool LayerTreeImpl::HasOnlyTranslationTransforms(const LayerImpl* layer) const {
- LayerTreeType tree_type =
- IsActiveTree() ? LayerTreeType::ACTIVE : LayerTreeType::PENDING;
+ ElementListType list_type =
+ IsActiveTree() ? ElementListType::ACTIVE : ElementListType::PENDING;
return layer_tree_host_impl_->animation_host()->HasOnlyTranslationTransforms(
- layer->id(), tree_type);
+ layer->id(), list_type);
}
bool LayerTreeImpl::MaximumTargetScale(const LayerImpl* layer,
float* max_scale) const {
*max_scale = 0.f;
- LayerTreeType tree_type =
- IsActiveTree() ? LayerTreeType::ACTIVE : LayerTreeType::PENDING;
+ ElementListType list_type =
+ IsActiveTree() ? ElementListType::ACTIVE : ElementListType::PENDING;
return layer_tree_host_impl_->animation_host()->MaximumTargetScale(
- layer->id(), tree_type, max_scale);
+ layer->id(), list_type, max_scale);
}
bool LayerTreeImpl::AnimationStartScale(const LayerImpl* layer,
float* start_scale) const {
*start_scale = 0.f;
- LayerTreeType tree_type =
- IsActiveTree() ? LayerTreeType::ACTIVE : LayerTreeType::PENDING;
+ ElementListType list_type =
+ IsActiveTree() ? ElementListType::ACTIVE : ElementListType::PENDING;
return layer_tree_host_impl_->animation_host()->AnimationStartScale(
- layer->id(), tree_type, start_scale);
+ layer->id(), list_type, start_scale);
}
bool LayerTreeImpl::HasFilterAnimationThatInflatesBounds(
« no previous file with comments | « cc/trees/layer_tree_host_unittest_animation.cc ('k') | cc/trees/mutator_host_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698