| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/wm/core/shadow.h" | 5 #include "ui/wm/core/shadow.h" |
| 6 | 6 |
| 7 #include "grit/ui_resources.h" | |
| 8 #include "third_party/skia/include/core/SkBitmap.h" | 7 #include "third_party/skia/include/core/SkBitmap.h" |
| 9 #include "ui/base/resource/resource_bundle.h" | 8 #include "ui/base/resource/resource_bundle.h" |
| 10 #include "ui/compositor/layer.h" | 9 #include "ui/compositor/layer.h" |
| 11 #include "ui/compositor/scoped_layer_animation_settings.h" | 10 #include "ui/compositor/scoped_layer_animation_settings.h" |
| 11 #include "ui/resources/grit/ui_resources.h" |
| 12 | 12 |
| 13 namespace { | 13 namespace { |
| 14 | 14 |
| 15 // Shadow opacity for different styles. | 15 // Shadow opacity for different styles. |
| 16 const float kActiveShadowOpacity = 1.0f; | 16 const float kActiveShadowOpacity = 1.0f; |
| 17 const float kInactiveShadowOpacity = 0.2f; | 17 const float kInactiveShadowOpacity = 0.2f; |
| 18 const float kSmallShadowOpacity = 1.0f; | 18 const float kSmallShadowOpacity = 1.0f; |
| 19 | 19 |
| 20 // Shadow aperture for different styles. | 20 // Shadow aperture for different styles. |
| 21 // Note that this may be greater than interior inset to allow shadows with | 21 // Note that this may be greater than interior inset to allow shadows with |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 if (layer_bounds.width() < border.width() || | 204 if (layer_bounds.width() < border.width() || |
| 205 layer_bounds.height() < border.height()) { | 205 layer_bounds.height() < border.height()) { |
| 206 shadow_layer_->SetVisible(false); | 206 shadow_layer_->SetVisible(false); |
| 207 } else { | 207 } else { |
| 208 shadow_layer_->SetVisible(true); | 208 shadow_layer_->SetVisible(true); |
| 209 shadow_layer_->UpdateNinePatchLayerBorder(border); | 209 shadow_layer_->UpdateNinePatchLayerBorder(border); |
| 210 } | 210 } |
| 211 } | 211 } |
| 212 | 212 |
| 213 } // namespace wm | 213 } // namespace wm |
| OLD | NEW |