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

Side by Side Diff: content/browser/android/edge_effect_l.cc

Issue 1122393003: CC: Plumb LayerSettings parameter for cc::Layer construction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 7 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 | « content/browser/android/edge_effect.cc ('k') | content/browser/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 "content/browser/android/edge_effect_l.h" 5 #include "content/browser/android/edge_effect_l.h"
6 6
7 #include "cc/layers/ui_resource_layer.h" 7 #include "cc/layers/ui_resource_layer.h"
8 #include "content/browser/android/animation_utils.h" 8 #include "content/browser/android/animation_utils.h"
9 #include "content/public/browser/android/compositor.h"
9 #include "ui/android/resources/resource_manager.h" 10 #include "ui/android/resources/resource_manager.h"
10 #include "ui/android/resources/system_ui_resource_type.h" 11 #include "ui/android/resources/system_ui_resource_type.h"
11 12
12 namespace content { 13 namespace content {
13 14
14 namespace { 15 namespace {
15 16
16 // Time it will take the effect to fully recede in ms 17 // Time it will take the effect to fully recede in ms
17 const int kRecedeTimeMs = 600; 18 const int kRecedeTimeMs = 600;
18 19
(...skipping 22 matching lines...) Expand all
41 const float kPullDistanceAlphaGlowFactor = 0.8f; 42 const float kPullDistanceAlphaGlowFactor = 0.8f;
42 43
43 const int kVelocityGlowFactor = 6; 44 const int kVelocityGlowFactor = 6;
44 45
45 const ui::SystemUIResourceType kResourceId = ui::OVERSCROLL_GLOW_L; 46 const ui::SystemUIResourceType kResourceId = ui::OVERSCROLL_GLOW_L;
46 47
47 } // namespace 48 } // namespace
48 49
49 EdgeEffectL::EdgeEffectL(ui::ResourceManager* resource_manager) 50 EdgeEffectL::EdgeEffectL(ui::ResourceManager* resource_manager)
50 : resource_manager_(resource_manager), 51 : resource_manager_(resource_manager),
51 glow_(cc::UIResourceLayer::Create()), 52 glow_(cc::UIResourceLayer::Create(Compositor::LayerSettings())),
52 glow_alpha_(0), 53 glow_alpha_(0),
53 glow_scale_y_(0), 54 glow_scale_y_(0),
54 glow_alpha_start_(0), 55 glow_alpha_start_(0),
55 glow_alpha_finish_(0), 56 glow_alpha_finish_(0),
56 glow_scale_y_start_(0), 57 glow_scale_y_start_(0),
57 glow_scale_y_finish_(0), 58 glow_scale_y_finish_(0),
58 displacement_(0.5f), 59 displacement_(0.5f),
59 target_displacement_(0.5f), 60 target_displacement_(0.5f),
60 state_(STATE_IDLE), 61 state_(STATE_IDLE),
61 pull_distance_(0) { 62 pull_distance_(0) {
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 } 262 }
262 263
263 // static 264 // static
264 void EdgeEffectL::PreloadResources(ui::ResourceManager* resource_manager) { 265 void EdgeEffectL::PreloadResources(ui::ResourceManager* resource_manager) {
265 DCHECK(resource_manager); 266 DCHECK(resource_manager);
266 resource_manager->PreloadResource(ui::ANDROID_RESOURCE_TYPE_SYSTEM, 267 resource_manager->PreloadResource(ui::ANDROID_RESOURCE_TYPE_SYSTEM,
267 kResourceId); 268 kResourceId);
268 } 269 }
269 270
270 } // namespace content 271 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/edge_effect.cc ('k') | content/browser/android/overscroll_glow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698