OLD | NEW |
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 Loading... |
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 |
OLD | NEW |