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

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: Removed 'Temporary' from comments. 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..91846dd7374d25104da974dc7d087c539fb32847 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) {
+ // Disable ink drop animations for accessibility purposes. See
Peter Kasting 2016/11/23 21:02:25 Nit: This sentence kinda sounds like we're always
bruthig 2016/11/23 21:43:36 Done.
+ // 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