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

Unified Diff: ui/views/bubble/tray_bubble_view.cc

Issue 568343002: Removed a few manual roundrect path creations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address reviewer comments Created 6 years, 3 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/views/bubble/bubble_border.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/bubble/tray_bubble_view.cc
diff --git a/ui/views/bubble/tray_bubble_view.cc b/ui/views/bubble/tray_bubble_view.cc
index 19e4717a2ec7e6a468526c00b2d358809dc69c84..d1cf48ee5ea9eb2ef4e5b6a24533b273c239953e 100644
--- a/ui/views/bubble/tray_bubble_view.cc
+++ b/ui/views/bubble/tray_bubble_view.cc
@@ -190,7 +190,7 @@ class TrayBubbleContentMask : public ui::LayerDelegate {
private:
ui::Layer layer_;
- SkScalar corner_radius_;
+ int corner_radius_;
DISALLOW_COPY_AND_ASSIGN(TrayBubbleContentMask);
};
@@ -206,13 +206,11 @@ TrayBubbleContentMask::~TrayBubbleContentMask() {
}
void TrayBubbleContentMask::OnPaintLayer(gfx::Canvas* canvas) {
- SkPath path;
- path.addRoundRect(gfx::RectToSkRect(gfx::Rect(layer()->bounds().size())),
- corner_radius_, corner_radius_);
SkPaint paint;
paint.setAlpha(255);
paint.setStyle(SkPaint::kFill_Style);
- canvas->DrawPath(path, paint);
+ gfx::Rect rect(layer()->bounds().size());
+ canvas->DrawRoundRect(rect, corner_radius_, paint);
}
void TrayBubbleContentMask::OnDeviceScaleFactorChanged(
« no previous file with comments | « ui/views/bubble/bubble_border.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698