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

Unified Diff: cc/trees/property_tree_builder.cc

Issue 1010663002: CC Animations: Redirect all compositor animation requests to AnimationHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@introduce
Patch Set: Rebase. Created 5 years, 6 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_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/property_tree_builder.cc
diff --git a/cc/trees/property_tree_builder.cc b/cc/trees/property_tree_builder.cc
index 1a63331dad66e1cd9550b98707ad56d118ec5093..28ad43f309111ac26e9eb433bc3e5acaf11f6500 100644
--- a/cc/trees/property_tree_builder.cc
+++ b/cc/trees/property_tree_builder.cc
@@ -63,16 +63,6 @@ static ClipNode* GetClipParent(const DataForRecursion<LayerType>& data,
}
template <typename LayerType>
-static bool HasPotentiallyRunningAnimation(LayerType* layer,
- Animation::TargetProperty property) {
- if (Animation* animation =
- layer->layer_animation_controller()->GetAnimation(property)) {
- return !animation->is_finished();
- }
- return false;
-}
-
-template <typename LayerType>
static bool RequiresClipNode(LayerType* layer,
const DataForRecursion<LayerType>& data,
int parent_transform_id,
@@ -174,11 +164,8 @@ bool AddTransformNodeIfNeeded(
!layer->transform().IsIdentityOr2DTranslation();
const bool has_potentially_animated_transform =
- HasPotentiallyRunningAnimation(layer, Animation::TRANSFORM);
-
- const bool has_animated_transform =
- layer->layer_animation_controller()->IsAnimatingProperty(
- Animation::TRANSFORM);
+ layer->HasPotentiallyRunningTransformAnimation();
+ const bool has_animated_transform = layer->TransformIsAnimating();
const bool has_surface = !!layer->render_surface();
@@ -343,12 +330,12 @@ bool AddTransformNodeIfNeeded(
}
bool IsAnimatingOpacity(Layer* layer) {
- return HasPotentiallyRunningAnimation(layer, Animation::OPACITY) ||
+ return layer->HasPotentiallyRunningOpacityAnimation() ||
layer->OpacityCanAnimateOnImplThread();
}
bool IsAnimatingOpacity(LayerImpl* layer) {
- return HasPotentiallyRunningAnimation(layer, Animation::OPACITY);
+ return layer->HasPotentiallyRunningOpacityAnimation();
}
template <typename LayerType>
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698