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

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

Issue 2273933002: cc : Delete LayerImpl::OnOpacityAnimated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments 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 unified diff | Download patch
« no previous file with comments | « cc/input/scrollbar_animation_controller_linear_fade_unittest.cc ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_thinning.h" 5 #include "cc/input/scrollbar_animation_controller_thinning.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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 float opacity, 136 float opacity,
137 float thumb_thickness_scale) { 137 float thumb_thickness_scale) {
138 for (ScrollbarLayerImplBase* scrollbar : Scrollbars()) { 138 for (ScrollbarLayerImplBase* scrollbar : Scrollbars()) {
139 if (!scrollbar->is_overlay_scrollbar()) 139 if (!scrollbar->is_overlay_scrollbar())
140 continue; 140 continue;
141 float effective_opacity = 141 float effective_opacity =
142 scrollbar->CanScrollOrientation() 142 scrollbar->CanScrollOrientation()
143 ? AdjustScale(opacity, scrollbar->Opacity(), opacity_change_) 143 ? AdjustScale(opacity, scrollbar->Opacity(), opacity_change_)
144 : 0; 144 : 0;
145 145
146 scrollbar->OnOpacityAnimated(effective_opacity); 146 PropertyTrees* property_trees =
147 scrollbar->layer_tree_impl()->property_trees();
148 // If this method is called during LayerImpl::PushPropertiesTo, we may not
149 // yet have valid effect_id_to_index_map entries as property trees are
150 // pushed after layers during activation. We can skip updating opacity in
151 // that case as we are only registering a scrollbar and because opacity will
152 // be overwritten anyway when property trees are pushed.
153 if (property_trees->IsInIdToIndexMap(PropertyTrees::TreeType::EFFECT,
154 scrollbar->id())) {
155 property_trees->effect_tree.OnOpacityAnimated(
156 effective_opacity,
157 property_trees->effect_id_to_index_map[scrollbar->id()],
158 scrollbar->layer_tree_impl());
159 }
147 scrollbar->SetThumbThicknessScaleFactor(AdjustScale( 160 scrollbar->SetThumbThicknessScaleFactor(AdjustScale(
148 thumb_thickness_scale, scrollbar->thumb_thickness_scale_factor(), 161 thumb_thickness_scale, scrollbar->thumb_thickness_scale_factor(),
149 thickness_change_)); 162 thickness_change_));
150 } 163 }
151 } 164 }
152 165
153 } // namespace cc 166 } // namespace cc
OLDNEW
« no previous file with comments | « cc/input/scrollbar_animation_controller_linear_fade_unittest.cc ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698