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

Unified Diff: ui/compositor/layer.h

Issue 10800020: Add brightness/grayscale animations and use them for OOBE boot transition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix hide animation Created 8 years, 5 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
« no previous file with comments | « chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer.h
diff --git a/ui/compositor/layer.h b/ui/compositor/layer.h
index 2a0772c7e27b195b069783b76f535a3a567bde88..bc16ee1fe16314603e1cb03e0f5de95fd38cefde 100644
--- a/ui/compositor/layer.h
+++ b/ui/compositor/layer.h
@@ -136,15 +136,31 @@ class COMPOSITOR_EXPORT Layer
void SetBackgroundBlur(int blur_radius);
// Saturate all pixels of this layer by this amount.
- // This effect will get "combined" with the inverted and brightness setting.
+ // This effect will get "combined" with the inverted,
+ // brightness and grayscale setting.
float layer_saturation() const { return layer_saturation_; }
void SetLayerSaturation(float saturation);
// Change the brightness of all pixels from this layer by this amount.
- // This effect will get "combined" with the inverted and saturate setting.
+ // This effect will get "combined" with the inverted, saturate
+ // and grayscale setting.
float layer_brightness() const { return layer_brightness_; }
void SetLayerBrightness(float brightness);
+ // Return the target brightness if animator is running, or the current
+ // brightness otherwise.
+ float GetTargetBrightness() const;
+
+ // Change the grayscale of all pixels from this layer by this amount.
+ // This effect will get "combined" with the inverted, saturate
+ // and brightness setting.
+ float layer_grayscale() const { return layer_grayscale_; }
+ void SetLayerGrayscale(float grayscale);
+
+ // Return the target grayscale if animator is running, or the current
+ // grayscale otherwise.
+ float GetTargetGrayscale() const;
+
// Invert the layer.
bool layer_inverted() const { return layer_inverted_; }
void SetLayerInverted(bool inverted);
@@ -286,17 +302,23 @@ class COMPOSITOR_EXPORT Layer
void SetTransformImmediately(const ui::Transform& transform);
void SetOpacityImmediately(float opacity);
void SetVisibilityImmediately(bool visibility);
+ void SetBrightnessImmediately(float brightness);
+ void SetGrayscaleImmediately(float grayscale);
// Implementation of LayerAnimatorDelegate
virtual void SetBoundsFromAnimation(const gfx::Rect& bounds) OVERRIDE;
virtual void SetTransformFromAnimation(const Transform& transform) OVERRIDE;
virtual void SetOpacityFromAnimation(float opacity) OVERRIDE;
virtual void SetVisibilityFromAnimation(bool visibility) OVERRIDE;
+ virtual void SetBrightnessFromAnimation(float brightness) OVERRIDE;
+ virtual void SetGrayscaleFromAnimation(float grayscale) OVERRIDE;
virtual void ScheduleDrawForAnimation() OVERRIDE;
virtual const gfx::Rect& GetBoundsForAnimation() const OVERRIDE;
virtual const Transform& GetTransformForAnimation() const OVERRIDE;
virtual float GetOpacityForAnimation() const OVERRIDE;
virtual bool GetVisibilityForAnimation() const OVERRIDE;
+ virtual float GetBrightnessForAnimation() const OVERRIDE;
+ virtual float GetGrayscaleForAnimation() const OVERRIDE;
void CreateWebLayer();
void RecomputeTransform();
@@ -342,6 +364,7 @@ class COMPOSITOR_EXPORT Layer
// the layer.
float layer_saturation_;
float layer_brightness_;
+ float layer_grayscale_;
bool layer_inverted_;
// The associated mask layer with this layer.
« no previous file with comments | « chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698