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: |