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

Unified Diff: cc/layer_impl.cc

Issue 12413020: Do not push properties that are animated on impl only. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 9 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/layer_impl.h ('k') | cc/layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_impl.cc
diff --git a/cc/layer_impl.cc b/cc/layer_impl.cc
index ff1ac7c652f60f6a7dc1ddd448c8ba2cad8a8795..dd0a21ee060e8f1e22b51f79db9cb52327fe1187 100644
--- a/cc/layer_impl.cc
+++ b/cc/layer_impl.cc
@@ -333,8 +333,7 @@ void LayerImpl::PushPropertiesTo(LayerImpl* layer) {
layer->SetNonFastScrollableRegion(non_fast_scrollable_region_);
layer->SetTouchEventHandlerRegion(touch_event_handler_region_);
layer->SetContentsOpaque(contents_opaque_);
- if (!OpacityIsAnimating())
- layer->SetOpacity(opacity_);
+ layer->SetOpacity(opacity_);
layer->SetPosition(position_);
layer->SetIsContainerForFixedPositionLayers(
is_container_for_fixed_position_layers_);
@@ -342,8 +341,7 @@ void LayerImpl::PushPropertiesTo(LayerImpl* layer) {
layer->SetPreserves3d(preserves_3d());
layer->SetUseParentBackfaceVisibility(use_parent_backface_visibility_);
layer->SetSublayerTransform(sublayer_transform_);
- if (!TransformIsAnimating())
- layer->SetTransform(transform_);
+ layer->SetTransform(transform_);
layer->SetScrollable(scrollable_);
layer->SetScrollOffset(scroll_offset_);
@@ -717,6 +715,12 @@ bool LayerImpl::OpacityIsAnimating() const {
return layer_animation_controller_->IsAnimatingProperty(Animation::Opacity);
}
+bool LayerImpl::OpacityIsAnimatingOnImplOnly() const {
+ Animation* opacity_animation =
+ layer_animation_controller_->GetAnimation(Animation::Opacity);
+ return opacity_animation && opacity_animation->is_impl_only();
+}
+
void LayerImpl::SetPosition(gfx::PointF position) {
if (position_ == position)
return;
@@ -755,6 +759,12 @@ bool LayerImpl::TransformIsAnimating() const {
return layer_animation_controller_->IsAnimatingProperty(Animation::Transform);
}
+bool LayerImpl::TransformIsAnimatingOnImplOnly() const {
+ Animation* transform_animation =
+ layer_animation_controller_->GetAnimation(Animation::Transform);
+ return transform_animation && transform_animation->is_impl_only();
+}
+
void LayerImpl::SetContentBounds(gfx::Size content_bounds) {
if (this->content_bounds() == content_bounds)
return;
« no previous file with comments | « cc/layer_impl.h ('k') | cc/layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698