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

Unified Diff: cc/layers/layer_impl.cc

Issue 361143002: Impl thread smooth scrolling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 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/layers/layer_impl.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index a5ae0607ff6bbce62557f1410883141a66062a6b..7a23e6618a9dd8dba589f35c5e2e9f08a56e2d31 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -75,8 +75,10 @@ LayerImpl::LayerImpl(LayerTreeImpl* tree_impl, int id)
layer_animation_controller_ =
registrar->GetAnimationControllerForId(layer_id_);
layer_animation_controller_->AddValueObserver(this);
- if (IsActive())
+ if (IsActive()) {
layer_animation_controller_->set_value_provider(this);
+ layer_animation_controller_->set_layer_animation_delegate(this);
+ }
SetNeedsPushProperties();
}
@@ -85,6 +87,7 @@ LayerImpl::~LayerImpl() {
layer_animation_controller_->RemoveValueObserver(this);
layer_animation_controller_->remove_value_provider(this);
+ layer_animation_controller_->remove_layer_animation_delegate(this);
if (!copy_requests_.empty() && layer_tree_impl_->IsActiveTree())
layer_tree_impl()->RemoveLayerWithCopyOutputRequest(this);
@@ -1491,4 +1494,12 @@ scoped_ptr<base::Value> LayerImpl::AsValue() const {
void LayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) {
benchmark->RunOnLayer(this);
}
+
+void LayerImpl::NotifyAnimationFinished(
+ base::TimeTicks monotonic_time,
+ Animation::TargetProperty target_property) {
+ if (target_property == Animation::ScrollOffset)
+ layer_tree_impl_->InputScrollAnimationFinished();
+}
+
} // namespace cc
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698