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

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

Issue 2508063004: Take size in ink drop masks instead of bounds (Closed)
Patch Set: Rebased Created 4 years, 1 month 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/animation/ink_drop_mask.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/animation/ink_drop_mask.cc
diff --git a/ui/views/animation/ink_drop_mask.cc b/ui/views/animation/ink_drop_mask.cc
index 5ab089e99834d3c37575bcfe7a588810e91dd82a..dda88e27a0387af405388494fd9e67a2e1cefbeb 100644
--- a/ui/views/animation/ink_drop_mask.cc
+++ b/ui/views/animation/ink_drop_mask.cc
@@ -12,10 +12,10 @@ namespace views {
// InkDropMask
-InkDropMask::InkDropMask(const gfx::Rect& layer_bounds)
+InkDropMask::InkDropMask(const gfx::Size& layer_size)
: layer_(ui::LAYER_TEXTURED) {
layer_.set_delegate(this);
- layer_.SetBounds(layer_bounds);
+ layer_.SetBounds(gfx::Rect(layer_size));
layer_.SetFillsBoundsOpaquely(false);
layer_.set_name("InkDropMaskLayer");
}
@@ -30,10 +30,10 @@ void InkDropMask::OnDeviceScaleFactorChanged(float device_scale_factor) {}
// RoundRectInkDropMask
-RoundRectInkDropMask::RoundRectInkDropMask(const gfx::Rect& layer_bounds,
+RoundRectInkDropMask::RoundRectInkDropMask(const gfx::Size& layer_size,
const gfx::Rect& mask_bounds,
int corner_radius)
- : InkDropMask(layer_bounds),
+ : InkDropMask(layer_size),
mask_bounds_(mask_bounds),
corner_radius_(corner_radius) {}
@@ -49,10 +49,10 @@ void RoundRectInkDropMask::OnPaintLayer(const ui::PaintContext& context) {
// CircleInkDropMask
-CircleInkDropMask::CircleInkDropMask(const gfx::Rect& layer_bounds,
+CircleInkDropMask::CircleInkDropMask(const gfx::Size& layer_size,
const gfx::Point& mask_center,
int mask_radius)
- : InkDropMask(layer_bounds),
+ : InkDropMask(layer_size),
mask_center_(mask_center),
mask_radius_(mask_radius) {}
« no previous file with comments | « ui/views/animation/ink_drop_mask.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698