| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/animation/element_animations.h" | 5 #include "cc/animation/element_animations.h" |
| 6 | 6 |
| 7 #include "cc/animation/animation_host.h" | 7 #include "cc/animation/animation_host.h" |
| 8 #include "cc/animation/animation_player.h" | 8 #include "cc/animation/animation_player.h" |
| 9 #include "cc/animation/animation_registrar.h" | 9 #include "cc/animation/animation_registrar.h" |
| 10 #include "cc/animation/layer_animation_value_observer.h" | 10 #include "cc/animation/layer_animation_value_observer.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 layer_id, LayerTreeType::ACTIVE)) | 87 layer_id, LayerTreeType::ACTIVE)) |
| 88 CreateActiveValueObserver(); | 88 CreateActiveValueObserver(); |
| 89 if (animation_host_->mutator_host_client()->IsLayerInTree( | 89 if (animation_host_->mutator_host_client()->IsLayerInTree( |
| 90 layer_id, LayerTreeType::PENDING)) | 90 layer_id, LayerTreeType::PENDING)) |
| 91 CreatePendingValueObserver(); | 91 CreatePendingValueObserver(); |
| 92 } | 92 } |
| 93 | 93 |
| 94 void ElementAnimations::DestroyLayerAnimationController() { | 94 void ElementAnimations::DestroyLayerAnimationController() { |
| 95 DCHECK(animation_host_); | 95 DCHECK(animation_host_); |
| 96 | 96 |
| 97 if (active_value_observer_) |
| 98 SetTransformIsPotentiallyAnimatingChanged(LayerTreeType::ACTIVE, false); |
| 99 if (pending_value_observer_) |
| 100 SetTransformIsPotentiallyAnimatingChanged(LayerTreeType::PENDING, false); |
| 101 |
| 97 DestroyPendingValueObserver(); | 102 DestroyPendingValueObserver(); |
| 98 DestroyActiveValueObserver(); | 103 DestroyActiveValueObserver(); |
| 99 | 104 |
| 100 if (layer_animation_controller_) { | 105 if (layer_animation_controller_) { |
| 101 layer_animation_controller_->remove_value_provider(this); | 106 layer_animation_controller_->remove_value_provider(this); |
| 102 layer_animation_controller_->remove_layer_animation_delegate(this); | 107 layer_animation_controller_->remove_layer_animation_delegate(this); |
| 103 layer_animation_controller_->SetAnimationRegistrar(nullptr); | 108 layer_animation_controller_->SetAnimationRegistrar(nullptr); |
| 104 layer_animation_controller_ = nullptr; | 109 layer_animation_controller_ = nullptr; |
| 105 } | 110 } |
| 106 } | 111 } |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 if (animation_host()) { | 263 if (animation_host()) { |
| 259 DCHECK(animation_host()->mutator_host_client()); | 264 DCHECK(animation_host()->mutator_host_client()); |
| 260 return animation_host()->mutator_host_client()->GetScrollOffsetForAnimation( | 265 return animation_host()->mutator_host_client()->GetScrollOffsetForAnimation( |
| 261 layer_id()); | 266 layer_id()); |
| 262 } | 267 } |
| 263 | 268 |
| 264 return gfx::ScrollOffset(); | 269 return gfx::ScrollOffset(); |
| 265 } | 270 } |
| 266 | 271 |
| 267 } // namespace cc | 272 } // namespace cc |
| OLD | NEW |