Index: ui/gfx/skbitmap_operations.cc |
diff --git a/ui/gfx/skbitmap_operations.cc b/ui/gfx/skbitmap_operations.cc |
index 76aa763fa43905a6a20a1ecfe74276f4349ed929..55328ff1e01aa5a5afbe8aae300113948a3782f3 100644 |
--- a/ui/gfx/skbitmap_operations.cc |
+++ b/ui/gfx/skbitmap_operations.cc |
@@ -741,9 +741,11 @@ SkBitmap SkBitmapOperations::CreateDropShadow( |
SkBitmap shadow_image = SkBitmapOperations::CreateColorMask(bitmap, |
shadow.color()); |
+ // The blur is halved to produce a shadow that correctly fits within the |
+ // |shadow_margin|. |
+ SkScalar sigma = SkDoubleToScalar(shadow.blur() / 2); |
skia::RefPtr<SkBlurImageFilter> filter = |
- skia::AdoptRef(SkBlurImageFilter::Create( |
- SkDoubleToScalar(shadow.blur()), SkDoubleToScalar(shadow.blur()))); |
+ skia::AdoptRef(SkBlurImageFilter::Create(sigma, sigma)); |
paint.setImageFilter(filter.get()); |
canvas.saveLayer(0, &paint); |