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

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

Issue 1422593003: Made material design ink drop QUICK_ACTION animation more visible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor fixes after self-review. Created 5 years, 2 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
Index: ui/views/animation/ink_drop_painted_layer_delegates.h
diff --git a/ui/views/animation/ink_drop_painted_layer_delegates.h b/ui/views/animation/ink_drop_painted_layer_delegates.h
index b0910242df87c4c9af0c2b9e46edcf69335b35cd..2439f0a1ae4bdb257cb3672a6bbaf4963945b627 100644
--- a/ui/views/animation/ink_drop_painted_layer_delegates.h
+++ b/ui/views/animation/ink_drop_painted_layer_delegates.h
@@ -8,6 +8,7 @@
#include "base/macros.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/compositor/layer_delegate.h"
+#include "ui/gfx/geometry/point_f.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
@@ -21,6 +22,9 @@ class BasePaintedLayerDelegate : public ui::LayerDelegate {
SkColor color() const { return color_; }
+ // Returns the center point of the painted shape.
+ virtual gfx::PointF GetCenterPoint() const = 0;
+
// ui::LayerDelegate:
void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) override;
void OnDeviceScaleFactorChanged(float device_scale_factor) override;
@@ -45,7 +49,8 @@ class CircleLayerDelegate : public BasePaintedLayerDelegate {
int radius() const { return radius_; }
- // ui::LayerDelegate:
+ // BasePaintedLayerDelegate:
+ gfx::PointF GetCenterPoint() const override;
void OnPaintLayer(const ui::PaintContext& context) override;
private:
@@ -64,7 +69,8 @@ class RectangleLayerDelegate : public BasePaintedLayerDelegate {
const gfx::Size& size() const { return size_; }
- // ui::LayerDelegate:
+ // BasePaintedLayerDelegate:
+ gfx::PointF GetCenterPoint() const override;
void OnPaintLayer(const ui::PaintContext& context) override;
private:
@@ -85,7 +91,8 @@ class RoundedRectangleLayerDelegate : public BasePaintedLayerDelegate {
const gfx::Size& size() const { return size_; }
- // ui::LayerDelegate:
+ // BasePaintedLayerDelegate:
+ gfx::PointF GetCenterPoint() const override;
void OnPaintLayer(const ui::PaintContext& context) override;
private:

Powered by Google App Engine
This is Rietveld 408576698