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

Unified Diff: ui/views/animation/flood_fill_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 | « no previous file | ui/views/animation/ink_drop_highlight.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/animation/flood_fill_ink_drop_ripple.cc
diff --git a/ui/views/animation/flood_fill_ink_drop_ripple.cc b/ui/views/animation/flood_fill_ink_drop_ripple.cc
index f11bfd53d6cbe139e6ae246d7c9b1be9f4ce39f7..9f61bed3559877d7a1d3a48a5e80fe618484df78 100644
--- a/ui/views/animation/flood_fill_ink_drop_ripple.cc
+++ b/ui/views/animation/flood_fill_ink_drop_ripple.cc
@@ -11,6 +11,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/point_conversions.h"
#include "ui/gfx/geometry/vector2d_f.h"
@@ -95,6 +96,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 | « no previous file | ui/views/animation/ink_drop_highlight.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698