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

Unified Diff: ui/views/controls/button/custom_button.cc

Issue 2406323002: CustomButton: restrict animation repaints to buttons that actually animate (Closed)
Patch Set: CustomButton: restrict animation repaints to buttons that actually animate Created 4 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/controls/button/custom_button.cc
diff --git a/ui/views/controls/button/custom_button.cc b/ui/views/controls/button/custom_button.cc
index 5bcd0c907fc2107e111dbfafed4adb36e43843ef..19c7f0125c18c7cbe045f07de71bb44efbf586c1 100644
--- a/ui/views/controls/button/custom_button.cc
+++ b/ui/views/controls/button/custom_button.cc
@@ -365,7 +365,8 @@ SkColor CustomButton::GetInkDropBaseColor() const {
// CustomButton, gfx::AnimationDelegate implementation:
void CustomButton::AnimationProgressed(const gfx::Animation* animation) {
- SchedulePaint();
+ if (animates_hover())
+ SchedulePaint();
}
////////////////////////////////////////////////////////////////////////////////

Powered by Google App Engine
This is Rietveld 408576698