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

Unified Diff: cc/animation/element_animations.cc

Issue 1009233002: CC Animations: Port Impl-only-scrolling to use compositor animation timelines. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ui
Patch Set: Fix the nit. Created 5 years, 5 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/animation/animation_timeline_unittest.cc ('k') | cc/test/animation_timelines_test_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/element_animations.cc
diff --git a/cc/animation/element_animations.cc b/cc/animation/element_animations.cc
index 934aec40660d05ec4a6283f11606161d5d4a0c00..2974bff91a259c3f0943d8312d2c49e4a4352967 100644
--- a/cc/animation/element_animations.cc
+++ b/cc/animation/element_animations.cc
@@ -37,7 +37,8 @@ class ElementAnimations::ValueObserver : public LayerAnimationValueObserver {
}
void OnAnimationWaitingForDeletion() override {
- // TODO(loyso): implement it.
+ // TODO(loyso): See Layer::OnAnimationWaitingForDeletion. But we always do
+ // PushProperties for AnimationTimelines for now.
}
bool IsActive() const override { return tree_type_ == LayerTreeType::ACTIVE; }
@@ -236,7 +237,13 @@ void ElementAnimations::NotifyAnimationFinished(
}
gfx::ScrollOffset ElementAnimations::ScrollOffsetForAnimation() const {
- // TODO(loyso): implement it.
+ DCHECK(layer_animation_controller_);
+ if (animation_host()) {
+ DCHECK(animation_host()->mutator_host_client());
+ return animation_host()->mutator_host_client()->GetScrollOffsetForAnimation(
+ layer_id());
+ }
+
return gfx::ScrollOffset();
}
« no previous file with comments | « cc/animation/animation_timeline_unittest.cc ('k') | cc/test/animation_timelines_test_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698