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

Unified Diff: cc/layers/layer.cc

Issue 60083018: Don't PushProperties every commit for animating layers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index 8d07366441b10ff6e5d3359c64851d1cc9a64b47..e0ffb5cd9356998102fb6ff4081bcd6d73bff045 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -927,9 +927,7 @@ void Layer::PushPropertiesTo(LayerImpl* layer) {
stacking_order_changed_ = false;
update_rect_ = gfx::RectF();
- // Animating layers require further push properties to clean up the animation.
- // crbug.com/259088
- needs_push_properties_ = layer_animation_controller_->has_any_animation();
+ needs_push_properties_ = false;
num_dependents_need_push_properties_ = 0;
}
@@ -998,6 +996,11 @@ void Layer::OnTransformAnimated(const gfx::Transform& transform) {
transform_ = transform;
}
+void Layer::OnAnimationWaitingForDeletion() {
+ // Animations are only deleted during PushProperties.
+ SetNeedsPushProperties();
+}
+
bool Layer::IsActive() const {
return true;
}
@@ -1027,7 +1030,6 @@ void Layer::SetLayerAnimationControllerForTest(
scoped_refptr<LayerAnimationController> controller) {
layer_animation_controller_->RemoveValueObserver(this);
layer_animation_controller_ = controller;
- layer_animation_controller_->set_force_sync();
layer_animation_controller_->AddValueObserver(this);
SetNeedsCommit();
}
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698