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

Unified Diff: cc/input/scrollbar_animation_controller.cc

Issue 2762123004: cc: LayerTreeHostImpl uses element id to tick animations (Closed)
Patch Set: remove accidental debug print Created 3 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
Index: cc/input/scrollbar_animation_controller.cc
diff --git a/cc/input/scrollbar_animation_controller.cc b/cc/input/scrollbar_animation_controller.cc
index 52f83e53ecae5db058a52ee1d4f2de8b6d64eddf..8e9e2e1a0c2ba1fa746769701c2d289ac10aa3d7 100644
--- a/cc/input/scrollbar_animation_controller.cc
+++ b/cc/input/scrollbar_animation_controller.cc
@@ -342,22 +342,7 @@ void ScrollbarAnimationController::ApplyOpacityToScrollbars(float opacity) {
if (!scrollbar->is_overlay_scrollbar())
continue;
float effective_opacity = scrollbar->CanScrollOrientation() ? opacity : 0;
- PropertyTrees* property_trees =
- scrollbar->layer_tree_impl()->property_trees();
- // If this method is called during LayerImpl::PushPropertiesTo, we may not
- // yet have valid owning_layer_id_to_node_index entries in effect tree 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->effect_tree.FindNodeIndexFromOwningLayerId(
- scrollbar->id()) != EffectTree::kInvalidNodeId) {
- property_trees->effect_tree.OnOpacityAnimated(
- effective_opacity,
- property_trees->effect_tree.FindNodeIndexFromOwningLayerId(
- scrollbar->id()),
- scrollbar->layer_tree_impl());
- }
+ scrollbar->SetOverlayScrollbarLayerOpacityAnimated(effective_opacity);
}
bool previouslyVisible = opacity_ > 0.0f;
« no previous file with comments | « no previous file | cc/input/scrollbar_animation_controller_unittest.cc » ('j') | cc/layers/scrollbar_layer_impl_base.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698