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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2269143003: cc : Add OnTransformAnimated to transform tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index df9e29bc9415aa07188c3c3b1a16a47ca3049314..36b9f4d49805c88992fde3c0671d209dfde275ae 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -3926,10 +3926,12 @@ void LayerTreeHostImpl::SetTreeLayerOpacityMutated(ElementId element_id,
if (!tree)
return;
- LayerImpl* layer = tree->LayerByElementId(element_id);
- if (layer)
- tree->property_trees()->effect_tree.OnOpacityAnimated(
- opacity, layer->effect_tree_index(), tree);
+ const int layer_id = tree->LayerIdByElementId(element_id);
+ const int effect_id =
+ tree->property_trees()->effect_id_to_index_map[layer_id];
+ if (effect_id != EffectTree::kInvalidNodeId)
+ tree->property_trees()->effect_tree.OnOpacityAnimated(opacity, effect_id,
+ tree);
}
void LayerTreeHostImpl::SetTreeLayerTransformMutated(
@@ -3939,9 +3941,15 @@ void LayerTreeHostImpl::SetTreeLayerTransformMutated(
if (!tree)
return;
- LayerImpl* layer = tree->LayerByElementId(element_id);
+ const int layer_id = tree->LayerIdByElementId(element_id);
+ const int transform_id =
+ tree->property_trees()->transform_id_to_index_map[layer_id];
+ if (transform_id != TransformTree::kInvalidNodeId)
+ tree->property_trees()->transform_tree.OnTransformAnimated(
+ transform, transform_id, tree);
+ LayerImpl* layer = tree->LayerById(layer_id);
if (layer)
- layer->OnTransformAnimated(transform);
+ layer->set_was_ever_ready_since_last_transform_animation(false);
}
void LayerTreeHostImpl::SetTreeLayerScrollOffsetMutated(
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698