| Index: cc/input/scrollbar_animation_controller_thinning.cc
|
| diff --git a/cc/input/scrollbar_animation_controller_thinning.cc b/cc/input/scrollbar_animation_controller_thinning.cc
|
| index 1a124ddf05093f27f89e5506272a5f7449fed89d..af02ad3cddb6d2ebf5b31d877bcecdba8abd8ac1 100644
|
| --- a/cc/input/scrollbar_animation_controller_thinning.cc
|
| +++ b/cc/input/scrollbar_animation_controller_thinning.cc
|
| @@ -143,7 +143,20 @@ void ScrollbarAnimationControllerThinning::ApplyOpacityAndThumbThicknessScale(
|
| ? AdjustScale(opacity, scrollbar->Opacity(), opacity_change_)
|
| : 0;
|
|
|
| - scrollbar->OnOpacityAnimated(effective_opacity);
|
| + PropertyTrees* property_trees =
|
| + scrollbar->layer_tree_impl()->property_trees();
|
| + // If this method is called during LayerImpl::PushPropertiesTo, we may not
|
| + // yet have valid effect_id_to_index_map 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())) {
|
| + property_trees->effect_tree.OnOpacityAnimated(
|
| + effective_opacity,
|
| + property_trees->effect_id_to_index_map[scrollbar->id()],
|
| + scrollbar->layer_tree_impl());
|
| + }
|
| scrollbar->SetThumbThicknessScaleFactor(AdjustScale(
|
| thumb_thickness_scale, scrollbar->thumb_thickness_scale_factor(),
|
| thickness_change_));
|
|
|