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

Unified Diff: ui/views/animation/ink_drop_painted_layer_delegates.cc

Issue 2101863002: Adjust sizes of material design shadows based on Sebastien's feedback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add bug link Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/skia_util.cc ('k') | ui/views/controls/button/md_text_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/animation/ink_drop_painted_layer_delegates.cc
diff --git a/ui/views/animation/ink_drop_painted_layer_delegates.cc b/ui/views/animation/ink_drop_painted_layer_delegates.cc
index 06622855714d7533966c6e46d5105603ad16ca6c..0ca68999ba97367906cd546d028abd390a136aa5 100644
--- a/ui/views/animation/ink_drop_painted_layer_delegates.cc
+++ b/ui/views/animation/ink_drop_painted_layer_delegates.cc
@@ -153,28 +153,25 @@ gfx::Vector2dF BorderShadowLayerDelegate::GetCenteringOffset() const {
void BorderShadowLayerDelegate::OnPaintLayer(const ui::PaintContext& context) {
SkPaint paint;
- paint.setLooper(gfx::CreateShadowDrawLooper(shadows_));
+ paint.setLooper(gfx::CreateShadowDrawLooperCorrectBlur(shadows_));
paint.setStyle(SkPaint::kStrokeAndFill_Style);
paint.setAntiAlias(true);
paint.setColor(SK_ColorTRANSPARENT);
paint.setStrokeJoin(SkPaint::kRound_Join);
- gfx::RectF bounds(bounds_);
- bounds -= GetPaintedBounds().OffsetFromOrigin();
- gfx::RectF stroke_bounds = bounds;
- stroke_bounds.Inset(-gfx::InsetsF(0.5f));
+ SkRect path_bounds = gfx::RectFToSkRect(
+ gfx::RectF(bounds_ - GetPaintedBounds().OffsetFromOrigin()));
ui::PaintRecorder recorder(context, GetPaintedBounds().size());
const SkScalar corner = SkFloatToScalar(corner_radius_);
SkPath path;
- path.addRoundRect(gfx::RectFToSkRect(stroke_bounds), corner, corner,
- SkPath::kCCW_Direction);
+ path.addRoundRect(path_bounds, corner, corner, SkPath::kCCW_Direction);
recorder.canvas()->DrawPath(path, paint);
SkPaint clear_paint;
clear_paint.setAntiAlias(true);
clear_paint.setXfermodeMode(SkXfermode::kClear_Mode);
- recorder.canvas()->sk_canvas()->drawRoundRect(gfx::RectFToSkRect(bounds),
- corner, corner, clear_paint);
+ recorder.canvas()->sk_canvas()->drawRoundRect(path_bounds, corner, corner,
+ clear_paint);
}
} // namespace views
« no previous file with comments | « ui/gfx/skia_util.cc ('k') | ui/views/controls/button/md_text_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698