diff options
Diffstat (limited to 'ui/compositor/layer_animation_element.h')
-rw-r--r-- | ui/compositor/layer_animation_element.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ui/compositor/layer_animation_element.h b/ui/compositor/layer_animation_element.h index 89bf26f..870f005 100644 --- a/ui/compositor/layer_animation_element.h +++ b/ui/compositor/layer_animation_element.h @@ -8,6 +8,7 @@ #include <set> #include "base/time.h" +#include "third_party/skia/include/core/SkColor.h" #include "ui/base/animation/tween.h" #include "ui/compositor/compositor_export.h" #include "ui/gfx/rect.h" @@ -30,7 +31,8 @@ class COMPOSITOR_EXPORT LayerAnimationElement { OPACITY, VISIBILITY, BRIGHTNESS, - GRAYSCALE + GRAYSCALE, + COLOR, }; struct COMPOSITOR_EXPORT TargetValue { @@ -44,6 +46,7 @@ class COMPOSITOR_EXPORT LayerAnimationElement { bool visibility; float brightness; float grayscale; + SkColor color; }; typedef std::set<AnimatableProperty> AnimatableProperties; @@ -105,6 +108,12 @@ class COMPOSITOR_EXPORT LayerAnimationElement { const AnimatableProperties& properties, base::TimeDelta duration); + // Creates an element that transitions to the given color. The caller owns the + // return value. + static LayerAnimationElement* CreateColorElement( + SkColor color, + base::TimeDelta duration); + // Updates the delegate to the appropriate value for |t|, which is in the // range [0, 1] (0 for initial, and 1 for final). If the animation is not // aborted, it is guaranteed that Progress will eventually be called with |