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

Unified Diff: ui/compositor/layer_animation_element.cc

Issue 1101823002: CC Animations: Make LayerAnimationController creation optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address observers attach/detach. Created 5 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
Index: ui/compositor/layer_animation_element.cc
diff --git a/ui/compositor/layer_animation_element.cc b/ui/compositor/layer_animation_element.cc
index 9a528e5509a553bc153c66a9011464bcc5ad9aff..962533d0ce63423ac17a78b8e6460fa98d36e62b 100644
--- a/ui/compositor/layer_animation_element.cc
+++ b/ui/compositor/layer_animation_element.cc
@@ -340,7 +340,7 @@ class ThreadedLayerAnimationElement : public LayerAnimationElement {
if (t < 1.0)
return false;
- if (Started()) {
+ if (Started() && IsThreaded()) {
delegate->RemoveThreadedAnimation(animation_id());
}
@@ -349,14 +349,14 @@ class ThreadedLayerAnimationElement : public LayerAnimationElement {
}
void OnAbort(LayerAnimationDelegate* delegate) override {
- if (delegate && Started()) {
+ if (delegate && Started() && IsThreaded()) {
delegate->RemoveThreadedAnimation(animation_id());
}
}
void RequestEffectiveStart(LayerAnimationDelegate* delegate) override {
DCHECK(animation_group_id());
- if (duration() == base::TimeDelta()) {
+ if (!IsThreaded()) {
set_effective_start_time(requested_start_time());
return;
}

Powered by Google App Engine
This is Rietveld 408576698