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

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

Issue 2520353004: Disabled ink drop animations based on gfx::Animation::ShouldRenderRichAnimation(). (Closed)
Patch Set: Updated comment wording. 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_highlight.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/animation/square_ink_drop_ripple.cc
diff --git a/ui/views/animation/square_ink_drop_ripple.cc b/ui/views/animation/square_ink_drop_ripple.cc
index ffa339e3f815beab4c1e24418b6972a00ae508f7..80fe47cc42751bc63afa1defbac7ac8354825371 100644
--- a/ui/views/animation/square_ink_drop_ripple.cc
+++ b/ui/views/animation/square_ink_drop_ripple.cc
@@ -10,6 +10,7 @@
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_animation_sequence.h"
#include "ui/compositor/scoped_layer_animation_settings.h"
+#include "ui/gfx/animation/animation.h"
#include "ui/gfx/geometry/point3_f.h"
#include "ui/gfx/geometry/point_conversions.h"
#include "ui/gfx/geometry/point_f.h"
@@ -126,6 +127,10 @@ int kAnimationDurationInMs[] = {
// Returns the InkDropState sub animation duration for the given |state|.
base::TimeDelta GetAnimationDuration(InkDropSubAnimations state) {
+ // Ink drop animations are controlled by the system animation settings for
+ // accessibility reasons."See https://crbug.com/658384.
+ if (!gfx::Animation::ShouldRenderRichAnimation())
+ return base::TimeDelta();
return base::TimeDelta::FromMilliseconds(
(views::InkDropRipple::UseFastAnimations()
? 1
« no previous file with comments | « ui/views/animation/ink_drop_highlight.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698