Chromium Code Reviews| Index: cc/input/scrollbar_animation_controller.cc |
| diff --git a/cc/input/scrollbar_animation_controller.cc b/cc/input/scrollbar_animation_controller.cc |
| index 4906ef4737db1921018b018ad1b8243652714805..b856937762e9ed1e77816839de51cdb32ef496da 100644 |
| --- a/cc/input/scrollbar_animation_controller.cc |
| +++ b/cc/input/scrollbar_animation_controller.cc |
| @@ -346,15 +346,16 @@ void ScrollbarAnimationController::ApplyOpacityToScrollbars(float opacity) { |
| PropertyTrees* property_trees = |
| scrollbar->layer_tree_impl()->property_trees(); |
| // If this method is called during LayerImpl::PushPropertiesTo, we may not |
| - // yet have valid layer_id_to_effect_node_index entries as property trees |
| - // are pushed after layers during activation. We can skip updating opacity |
| - // in that case as we are only registering a scrollbar and because opacity |
| - // will be overwritten anyway when property trees are pushed. |
| - if (property_trees->IsInIdToIndexMap(PropertyTrees::TreeType::EFFECT, |
| - scrollbar->id())) { |
| + // yet have valid layer_id_to_node_index entries in effect tree as property |
|
pdr.
2017/03/16 22:17:41
Nit layer_id_to_node_index -> owning_layer_id_to_n
|
| + // trees are pushed after layers during activation. We can skip updating |
| + // opacity in that case as we are only registering a scrollbar and because |
| + // opacity will be overwritten anyway when property trees are pushed. |
| + if (property_trees->effect_tree.FindNodeIndexFromOwningLayerId( |
| + scrollbar->id()) != EffectTree::kInvalidNodeId) { |
| property_trees->effect_tree.OnOpacityAnimated( |
| effective_opacity, |
| - property_trees->layer_id_to_effect_node_index[scrollbar->id()], |
| + property_trees->effect_tree.FindNodeIndexFromOwningLayerId( |
| + scrollbar->id()), |
| scrollbar->layer_tree_impl()); |
| } |
| } |