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

Side by Side Diff: cc/input/scrollbar_animation_controller_linear_fade.cc

Issue 2616353003: Clarify property tree id-to-index map names. (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/input/scrollbar_animation_controller_linear_fade.h" 5 #include "cc/input/scrollbar_animation_controller_linear_fade.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "cc/layers/layer_impl.h" 9 #include "cc/layers/layer_impl.h"
10 #include "cc/layers/scrollbar_layer_impl_base.h" 10 #include "cc/layers/scrollbar_layer_impl_base.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 } 56 }
57 57
58 void ScrollbarAnimationControllerLinearFade::ApplyOpacityToScrollbars( 58 void ScrollbarAnimationControllerLinearFade::ApplyOpacityToScrollbars(
59 float opacity) { 59 float opacity) {
60 for (ScrollbarLayerImplBase* scrollbar : Scrollbars()) { 60 for (ScrollbarLayerImplBase* scrollbar : Scrollbars()) {
61 if (!scrollbar->is_overlay_scrollbar()) 61 if (!scrollbar->is_overlay_scrollbar())
62 continue; 62 continue;
63 PropertyTrees* property_trees = 63 PropertyTrees* property_trees =
64 scrollbar->layer_tree_impl()->property_trees(); 64 scrollbar->layer_tree_impl()->property_trees();
65 // If this method is called during LayerImpl::PushPropertiesTo, we may not 65 // If this method is called during LayerImpl::PushPropertiesTo, we may not
66 // yet have valid effect_id_to_index_map entries as property trees are 66 // yet have valid layer_id_to_effect_node_index entries as property trees
67 // are
ajuma 2017/01/10 00:51:44 nit: needs re-wrapping
wkorman 2017/01/10 01:13:43 Done.
67 // pushed after layers during activation. We can skip updating opacity in 68 // pushed after layers during activation. We can skip updating opacity in
68 // that case as we are only registering a scrollbar and because opacity will 69 // that case as we are only registering a scrollbar and because opacity will
69 // be overwritten anyway when property trees are pushed. 70 // be overwritten anyway when property trees are pushed.
70 if (property_trees->IsInIdToIndexMap(PropertyTrees::TreeType::EFFECT, 71 if (property_trees->IsInIdToIndexMap(PropertyTrees::TreeType::EFFECT,
71 scrollbar->id())) { 72 scrollbar->id())) {
72 property_trees->effect_tree.OnOpacityAnimated( 73 property_trees->effect_tree.OnOpacityAnimated(
73 scrollbar->CanScrollOrientation() ? opacity : 0, 74 scrollbar->CanScrollOrientation() ? opacity : 0,
74 property_trees->effect_id_to_index_map[scrollbar->id()], 75 property_trees->layer_id_to_effect_node_index[scrollbar->id()],
75 scrollbar->layer_tree_impl()); 76 scrollbar->layer_tree_impl());
76 } 77 }
77 } 78 }
78 } 79 }
79 80
80 } // namespace cc 81 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698