Commit 1c4843ae authored by Tetsui Ohkubo's avatar Tetsui Ohkubo Committed by Commit Bot

Remove notification background clip path.

In MessageView, path clipping was used to round background corners.
As NotificationBackgroundPainter is implemented, we no longer have to
use clipping path. Having both led to artifact. (see crbug)

TEST=manual
BUG=862653

Change-Id: I7944e43ece5c2fd0c165f34377ee774c7c62a436
Reviewed-on: https://chromium-review.googlesource.com/1166776Reviewed-by: default avatarYoshiki Iguchi <yoshiki@chromium.org>
Commit-Queue: Tetsui Ohkubo <tetsui@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581761}
parent 5613aca3
......@@ -74,7 +74,14 @@ MessageView::MessageView(const Notification& notification)
// Create the opaque background that's above the view's shadow.
background_view_ = new views::View();
UpdateCornerRadius(0, 0);
// ChromeOS rounds the corners of the message view. TODO(estade): should we do
// this for all platforms?
if (ShouldRoundMessageViewCorners())
UpdateCornerRadius(kNotificationCornerRadius, kNotificationCornerRadius);
else
UpdateCornerRadius(0, 0);
AddChildView(background_view_);
focus_painter_ = views::Painter::CreateSolidFocusPainter(
......@@ -246,16 +253,6 @@ void MessageView::Layout() {
// Background.
background_view_->SetBoundsRect(content_bounds);
// ChromeOS rounds the corners of the message view. TODO(estade): should we do
// this for all platforms?
if (ShouldRoundMessageViewCorners()) {
gfx::Path path;
constexpr SkScalar kCornerRadius = SkIntToScalar(kNotificationCornerRadius);
path.addRoundRect(gfx::RectToSkRect(background_view_->GetLocalBounds()),
kCornerRadius, kCornerRadius);
background_view_->set_clip_path(path);
}
}
const char* MessageView::GetClassName() const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment