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

Unified Diff: cc/trees/layer_tree_impl.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.h ('k') | cc/trees/property_tree_builder.cc » ('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 3fc54411f7e3fae007f2b0318852679dda89bbd6..d4d2dee7f23a7d00e4fdc3aef3c22f6089580100 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -32,6 +32,7 @@
#include "cc/trees/occlusion_tracker.h"
#include "cc/trees/property_tree.h"
#include "cc/trees/property_tree_builder.h"
+#include "ui/gfx/geometry/box_f.h"
#include "ui/gfx/geometry/point_conversions.h"
#include "ui/gfx/geometry/size_conversions.h"
#include "ui/gfx/geometry/vector2d_conversions.h"
@@ -1625,4 +1626,131 @@ scoped_ptr<PendingPageScaleAnimation>
return pending_page_scale_animation_.Pass();
}
+bool LayerTreeImpl::IsAnimatingFilterProperty(const LayerImpl* layer) const {
+ return layer_tree_host_impl_->animation_host()
+ ? layer_tree_host_impl_->animation_host()
+ ->IsAnimatingFilterProperty(layer->id())
+ : false;
+}
+
+bool LayerTreeImpl::IsAnimatingOpacityProperty(const LayerImpl* layer) const {
+ return layer_tree_host_impl_->animation_host()
+ ? layer_tree_host_impl_->animation_host()
+ ->IsAnimatingOpacityProperty(layer->id())
+ : false;
+}
+
+bool LayerTreeImpl::IsAnimatingTransformProperty(const LayerImpl* layer) const {
+ return layer_tree_host_impl_->animation_host()
+ ? layer_tree_host_impl_->animation_host()
+ ->IsAnimatingTransformProperty(layer->id())
+ : false;
+}
+
+bool LayerTreeImpl::HasPotentiallyRunningOpacityAnimation(
+ const LayerImpl* layer) const {
+ return layer_tree_host_impl_->animation_host()
+ ? layer_tree_host_impl_->animation_host()
+ ->HasPotentiallyRunningOpacityAnimation(layer->id())
+ : false;
+}
+
+bool LayerTreeImpl::HasPotentiallyRunningTransformAnimation(
+ const LayerImpl* layer) const {
+ return layer_tree_host_impl_->animation_host()
+ ? layer_tree_host_impl_->animation_host()
+ ->HasPotentiallyRunningTransformAnimation(layer->id())
+ : false;
+}
+
+bool LayerTreeImpl::FilterIsAnimatingOnImplOnly(const LayerImpl* layer) const {
+ return layer_tree_host_impl_->animation_host()
+ ? layer_tree_host_impl_->animation_host()
+ ->FilterIsAnimatingOnImplOnly(layer->id())
+ : false;
+}
+
+bool LayerTreeImpl::OpacityIsAnimatingOnImplOnly(const LayerImpl* layer) const {
+ return layer_tree_host_impl_->animation_host()
+ ? layer_tree_host_impl_->animation_host()
+ ->OpacityIsAnimatingOnImplOnly(layer->id())
+ : false;
+}
+
+bool LayerTreeImpl::TransformIsAnimatingOnImplOnly(
+ const LayerImpl* layer) const {
+ return layer_tree_host_impl_->animation_host()
+ ? layer_tree_host_impl_->animation_host()
+ ->TransformIsAnimatingOnImplOnly(layer->id())
+ : false;
+}
+
+bool LayerTreeImpl::HasOnlyTranslationTransforms(const LayerImpl* layer) const {
+ return layer_tree_host_impl_->animation_host()
+ ? layer_tree_host_impl_->animation_host()
+ ->HasOnlyTranslationTransforms(layer->id())
+ : true;
+}
+
+bool LayerTreeImpl::MaximumTargetScale(const LayerImpl* layer,
+ float* max_scale) const {
+ *max_scale = 0.f;
+ return layer_tree_host_impl_->animation_host()
+ ? layer_tree_host_impl_->animation_host()->MaximumTargetScale(
+ layer->id(), max_scale)
+ : true;
+}
+
+bool LayerTreeImpl::AnimationStartScale(const LayerImpl* layer,
+ float* start_scale) const {
+ *start_scale = 0.f;
+ return layer_tree_host_impl_->animation_host()
+ ? layer_tree_host_impl_->animation_host()->AnimationStartScale(
+ layer->id(), start_scale)
+ : true;
+}
+
+bool LayerTreeImpl::HasFilterAnimationThatInflatesBounds(
+ const LayerImpl* layer) const {
+ return layer_tree_host_impl_->animation_host()
+ ? layer_tree_host_impl_->animation_host()
+ ->HasFilterAnimationThatInflatesBounds(layer->id())
+ : false;
+}
+
+bool LayerTreeImpl::HasTransformAnimationThatInflatesBounds(
+ const LayerImpl* layer) const {
+ return layer_tree_host_impl_->animation_host()
+ ? layer_tree_host_impl_->animation_host()
+ ->HasTransformAnimationThatInflatesBounds(layer->id())
+ : false;
+}
+
+bool LayerTreeImpl::HasAnimationThatInflatesBounds(
+ const LayerImpl* layer) const {
+ return layer_tree_host_impl_->animation_host()
+ ? layer_tree_host_impl_->animation_host()
+ ->HasAnimationThatInflatesBounds(layer->id())
+ : false;
+}
+
+bool LayerTreeImpl::FilterAnimationBoundsForBox(const LayerImpl* layer,
+ const gfx::BoxF& box,
+ gfx::BoxF* bounds) const {
+ return layer_tree_host_impl_->animation_host()
+ ? layer_tree_host_impl_->animation_host()
+ ->FilterAnimationBoundsForBox(layer->id(), box, bounds)
+ : false;
+}
+
+bool LayerTreeImpl::TransformAnimationBoundsForBox(const LayerImpl* layer,
+ const gfx::BoxF& box,
+ gfx::BoxF* bounds) const {
+ *bounds = gfx::BoxF();
+ return layer_tree_host_impl_->animation_host()
+ ? layer_tree_host_impl_->animation_host()
+ ->TransformAnimationBoundsForBox(layer->id(), box, bounds)
+ : true;
+}
+
} // namespace cc
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698