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

Unified Diff: cc/animation/element_animations.cc

Issue 1894023002: CC Animation: Make ElementAnimations a ref-counted object. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/animation/element_animations.h ('k') | cc/animation/element_animations_unittest.cc » ('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 3eab9e7b6333d06ae7e1f10134de32f4a829f7ec..cde0788217d85a7d8689ba1bfc249fe5bca6ae7f 100644
--- a/cc/animation/element_animations.cc
+++ b/cc/animation/element_animations.cc
@@ -12,9 +12,9 @@
namespace cc {
-std::unique_ptr<ElementAnimations> ElementAnimations::Create(
+scoped_refptr<ElementAnimations> ElementAnimations::Create(
AnimationHost* host) {
- return base::WrapUnique(new ElementAnimations(host));
+ return make_scoped_refptr(new ElementAnimations(host));
}
ElementAnimations::ElementAnimations(AnimationHost* host)
@@ -103,7 +103,7 @@ bool ElementAnimations::IsEmpty() const {
}
void ElementAnimations::PushPropertiesTo(
- ElementAnimations* element_animations_impl) {
+ scoped_refptr<ElementAnimations> element_animations_impl) {
DCHECK(layer_animation_controller_);
DCHECK(element_animations_impl->layer_animation_controller_);
@@ -191,8 +191,8 @@ void ElementAnimations::OnScrollOffsetAnimated(
}
void ElementAnimations::OnAnimationWaitingForDeletion() {
- // TODO(loyso): See Layer::OnAnimationWaitingForDeletion. But we always do
- // PushProperties for AnimationTimelines for now.
+ // TODO(loyso): Invalidate AnimationHost::SetNeedsPushProperties here.
+ // But we always do PushProperties in AnimationHost for now. crbug.com/604280
}
void ElementAnimations::OnTransformIsPotentiallyAnimatingChanged(
« no previous file with comments | « cc/animation/element_animations.h ('k') | cc/animation/element_animations_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698