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

Side by Side Diff: ui/views/shadow_border.cc

Issue 2661353002: ui/gfx: split out code that depends on paint (Closed)
Patch Set: Fix mac, chromeos build 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/views/controls/button/toggle_button.cc ('k') | no next file » | 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 "ui/views/shadow_border.h" 5 #include "ui/views/shadow_border.h"
6 6
7 #include "third_party/skia/include/core/SkDrawLooper.h" 7 #include "third_party/skia/include/core/SkDrawLooper.h"
8 #include "ui/gfx/canvas.h" 8 #include "ui/gfx/canvas.h"
9 #include "ui/gfx/geometry/insets.h" 9 #include "ui/gfx/geometry/insets.h"
10 #include "ui/gfx/geometry/rect.h" 10 #include "ui/gfx/geometry/rect.h"
11 #include "ui/gfx/skia_util.h" 11 #include "ui/gfx/skia_paint_util.h"
12 #include "ui/views/view.h" 12 #include "ui/views/view.h"
13 13
14 namespace views { 14 namespace views {
15 15
16 namespace { 16 namespace {
17 17
18 gfx::Insets GetInsetsFromShadowValue(const gfx::ShadowValue& shadow) { 18 gfx::Insets GetInsetsFromShadowValue(const gfx::ShadowValue& shadow) {
19 std::vector<gfx::ShadowValue> shadows; 19 std::vector<gfx::ShadowValue> shadows;
20 shadows.push_back(shadow); 20 shadows.push_back(shadow);
21 return -gfx::ShadowValue::GetMargin(shadows); 21 return -gfx::ShadowValue::GetMargin(shadows);
(...skipping 26 matching lines...) Expand all
48 48
49 gfx::Insets ShadowBorder::GetInsets() const { 49 gfx::Insets ShadowBorder::GetInsets() const {
50 return insets_; 50 return insets_;
51 } 51 }
52 52
53 gfx::Size ShadowBorder::GetMinimumSize() const { 53 gfx::Size ShadowBorder::GetMinimumSize() const {
54 return gfx::Size(shadow_value_.blur(), shadow_value_.blur()); 54 return gfx::Size(shadow_value_.blur(), shadow_value_.blur());
55 } 55 }
56 56
57 } // namespace views 57 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/button/toggle_button.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698