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

Side by Side Diff: ui/android/edge_effect_l.cc

Issue 1783613004: CC Animation: Erase cc::LayerSettings everywhere. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@eraseandroid
Patch Set: Rebase. Created 4 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 unified diff | Download patch
« no previous file with comments | « ui/android/edge_effect.cc ('k') | ui/android/overscroll_glow.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/android/edge_effect_l.h" 5 #include "ui/android/edge_effect_l.h"
6 6
7 #include "cc/layers/layer_settings.h"
8 #include "cc/layers/ui_resource_layer.h" 7 #include "cc/layers/ui_resource_layer.h"
9 #include "ui/android/animation_utils.h" 8 #include "ui/android/animation_utils.h"
10 #include "ui/android/resources/resource_manager.h" 9 #include "ui/android/resources/resource_manager.h"
11 #include "ui/android/resources/system_ui_resource_type.h" 10 #include "ui/android/resources/system_ui_resource_type.h"
12 #include "ui/android/window_android_compositor.h" 11 #include "ui/android/window_android_compositor.h"
13 #include "ui/gfx/geometry/rect_f.h" 12 #include "ui/gfx/geometry/rect_f.h"
14 #include "ui/gfx/geometry/size_conversions.h" 13 #include "ui/gfx/geometry/size_conversions.h"
15 14
16 namespace ui { 15 namespace ui {
17 16
(...skipping 27 matching lines...) Expand all
45 const float kPullDistanceAlphaGlowFactor = 0.8f; 44 const float kPullDistanceAlphaGlowFactor = 0.8f;
46 45
47 const int kVelocityGlowFactor = 6; 46 const int kVelocityGlowFactor = 6;
48 47
49 const ui::SystemUIResourceType kResourceId = ui::OVERSCROLL_GLOW_L; 48 const ui::SystemUIResourceType kResourceId = ui::OVERSCROLL_GLOW_L;
50 49
51 } // namespace 50 } // namespace
52 51
53 EdgeEffectL::EdgeEffectL(ui::ResourceManager* resource_manager) 52 EdgeEffectL::EdgeEffectL(ui::ResourceManager* resource_manager)
54 : resource_manager_(resource_manager), 53 : resource_manager_(resource_manager),
55 glow_(cc::UIResourceLayer::Create(cc::LayerSettings())), 54 glow_(cc::UIResourceLayer::Create()),
56 glow_alpha_(0), 55 glow_alpha_(0),
57 glow_scale_y_(0), 56 glow_scale_y_(0),
58 glow_alpha_start_(0), 57 glow_alpha_start_(0),
59 glow_alpha_finish_(0), 58 glow_alpha_finish_(0),
60 glow_scale_y_start_(0), 59 glow_scale_y_start_(0),
61 glow_scale_y_finish_(0), 60 glow_scale_y_finish_(0),
62 displacement_(0.5f), 61 displacement_(0.5f),
63 target_displacement_(0.5f), 62 target_displacement_(0.5f),
64 state_(STATE_IDLE), 63 state_(STATE_IDLE),
65 pull_distance_(0) { 64 pull_distance_(0) {
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 } 292 }
294 293
295 // static 294 // static
296 void EdgeEffectL::PreloadResources(ui::ResourceManager* resource_manager) { 295 void EdgeEffectL::PreloadResources(ui::ResourceManager* resource_manager) {
297 DCHECK(resource_manager); 296 DCHECK(resource_manager);
298 resource_manager->PreloadResource(ui::ANDROID_RESOURCE_TYPE_SYSTEM, 297 resource_manager->PreloadResource(ui::ANDROID_RESOURCE_TYPE_SYSTEM,
299 kResourceId); 298 kResourceId);
300 } 299 }
301 300
302 } // namespace ui 301 } // namespace ui
OLDNEW
« no previous file with comments | « ui/android/edge_effect.cc ('k') | ui/android/overscroll_glow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698