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

Side by Side Diff: cc/animation/element_animations.cc

Issue 1413003002: CC Animations: Fix AnimationHost mode integration with Property Trees. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: An attempt to fix weird EXPECT_EQ compilation errors. Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « cc/animation/animation_player.cc ('k') | cc/test/animation_timelines_test_common.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/animation/animation_player.cc ('k') | cc/test/animation_timelines_test_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698