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

Side by Side Diff: ui/gfx/shadow_util.cc

Issue 2691393002: Fix auto raw pointer deduction on linux (Closed)
Patch Set: rebase Created 3 years, 10 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/gfx/image/image_skia_operations.cc ('k') | ui/message_center/notification_list.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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/gfx/shadow_util.h" 5 #include "ui/gfx/shadow_util.h"
6 6
7 #include <map> 7 #include <map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // "Key shadow": y offset is elevation and blur is twice the elevation. 99 // "Key shadow": y offset is elevation and blur is twice the elevation.
100 shadow->values.emplace_back(gfx::Vector2d(0, elevation), 100 shadow->values.emplace_back(gfx::Vector2d(0, elevation),
101 kBlurCorrection * elevation * 2, 101 kBlurCorrection * elevation * 2,
102 SkColorSetA(SK_ColorBLACK, 0x3d)); 102 SkColorSetA(SK_ColorBLACK, 0x3d));
103 // "Ambient shadow": no offset and blur matches the elevation. 103 // "Ambient shadow": no offset and blur matches the elevation.
104 shadow->values.emplace_back(gfx::Vector2d(), kBlurCorrection * elevation, 104 shadow->values.emplace_back(gfx::Vector2d(), kBlurCorrection * elevation,
105 SkColorSetA(SK_ColorBLACK, 0x1f)); 105 SkColorSetA(SK_ColorBLACK, 0x1f));
106 // To see what this looks like for elevation 24, try this CSS: 106 // To see what this looks like for elevation 24, try this CSS:
107 // box-shadow: 0 24px 48px rgba(0, 0, 0, .24), 107 // box-shadow: 0 24px 48px rgba(0, 0, 0, .24),
108 // 0 0 24px rgba(0, 0, 0, .12); 108 // 0 0 24px rgba(0, 0, 0, .12);
109 auto source = new ShadowNineboxSource(shadow->values, corner_radius); 109 auto* source = new ShadowNineboxSource(shadow->values, corner_radius);
110 shadow->ninebox_image = ImageSkia(source, source->size()); 110 shadow->ninebox_image = ImageSkia(source, source->size());
111 return *shadow; 111 return *shadow;
112 } 112 }
113 113
114 } // namespace gfx 114 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/image/image_skia_operations.cc ('k') | ui/message_center/notification_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698