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

Side by Side Diff: ui/views/animation/test/flood_fill_ink_drop_ripple_test_api.h

Issue 2615613003: Fix double ripple on activated flood fill ripple (Closed)
Patch Set: Added tests Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_ANIMATION_TEST_FLOOD_FILL_INK_DROP_RIPPLE_TEST_API_H_ 5 #ifndef UI_VIEWS_ANIMATION_TEST_FLOOD_FILL_INK_DROP_RIPPLE_TEST_API_H_
6 #define UI_VIEWS_ANIMATION_TEST_FLOOD_FILL_INK_DROP_RIPPLE_TEST_API_H_ 6 #define UI_VIEWS_ANIMATION_TEST_FLOOD_FILL_INK_DROP_RIPPLE_TEST_API_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 19 matching lines...) Expand all
30 // space for the given radius. 30 // space for the given radius.
31 void TransformPoint(float radius, gfx::Point* point); 31 void TransformPoint(float radius, gfx::Point* point);
32 32
33 // Returns the center point that the ripple is drawn at in the original Canvas 33 // Returns the center point that the ripple is drawn at in the original Canvas
34 // coordinate space. 34 // coordinate space.
35 gfx::Point GetDrawnCenterPoint() const; 35 gfx::Point GetDrawnCenterPoint() const;
36 36
37 // Wrapper for FloodFillInkDropRipple::MaxDistanceToCorners(). 37 // Wrapper for FloodFillInkDropRipple::MaxDistanceToCorners().
38 float MaxDistanceToCorners(const gfx::Point& point) const; 38 float MaxDistanceToCorners(const gfx::Point& point) const;
39 39
40 // Gets the transform currently applied to the painted layer of the ripple.
41 gfx::Transform GetPaintedLayerTransform() const;
42
40 // InkDropRippleTestApi: 43 // InkDropRippleTestApi:
41 float GetCurrentOpacity() const override; 44 float GetCurrentOpacity() const override;
42 45
43 protected: 46 protected:
44 // InkDropRippleTestApi: 47 // InkDropRippleTestApi:
45 std::vector<ui::LayerAnimator*> GetLayerAnimators() override; 48 std::vector<ui::LayerAnimator*> GetLayerAnimators() override;
46 49
47 private: 50 private:
48 FloodFillInkDropRipple* ink_drop_ripple() { 51 FloodFillInkDropRipple* ink_drop_ripple() {
49 return static_cast<const FloodFillInkDropRippleTestApi*>(this) 52 return static_cast<const FloodFillInkDropRippleTestApi*>(this)
50 ->ink_drop_ripple(); 53 ->ink_drop_ripple();
51 } 54 }
52 55
53 FloodFillInkDropRipple* ink_drop_ripple() const { 56 FloodFillInkDropRipple* ink_drop_ripple() const {
54 return static_cast<FloodFillInkDropRipple*>( 57 return static_cast<FloodFillInkDropRipple*>(
55 InkDropRippleTestApi::ink_drop_ripple()); 58 InkDropRippleTestApi::ink_drop_ripple());
56 } 59 }
57 60
58 DISALLOW_COPY_AND_ASSIGN(FloodFillInkDropRippleTestApi); 61 DISALLOW_COPY_AND_ASSIGN(FloodFillInkDropRippleTestApi);
59 }; 62 };
60 63
61 } // namespace test 64 } // namespace test
62 } // namespace views 65 } // namespace views
63 66
64 #endif // UI_VIEWS_ANIMATION_TEST_FLOOD_FILL_INK_DROP_RIPPLE_TEST_API_H_ 67 #endif // UI_VIEWS_ANIMATION_TEST_FLOOD_FILL_INK_DROP_RIPPLE_TEST_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698