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

Unified Diff: ui/compositor/layer_animation_element.h

Issue 2854653003: [Night Light] Backend ui::Layer work (Closed)
Patch Set: Created 3 years, 8 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 | « ui/compositor/layer_animation_delegate.h ('k') | ui/compositor/layer_animation_element.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer_animation_element.h
diff --git a/ui/compositor/layer_animation_element.h b/ui/compositor/layer_animation_element.h
index 664468e3bc17ca08f1d10947cb135c13f4bf6f4c..d4f248dece54250bfe1f7ffd33c807996392023c 100644
--- a/ui/compositor/layer_animation_element.h
+++ b/ui/compositor/layer_animation_element.h
@@ -45,10 +45,11 @@ class COMPOSITOR_EXPORT LayerAnimationElement {
BRIGHTNESS = (1 << 4),
GRAYSCALE = (1 << 5),
COLOR = (1 << 6),
+ TEMPERATURE = (1 << 7),
// Used when iterating over properties.
FIRST_PROPERTY = TRANSFORM,
- SENTINEL = (1 << 7)
+ SENTINEL = (1 << 8)
};
static AnimatableProperty ToAnimatableProperty(
@@ -66,6 +67,7 @@ class COMPOSITOR_EXPORT LayerAnimationElement {
float brightness;
float grayscale;
SkColor color;
+ float temperature;
};
typedef uint32_t AnimatableProperties;
@@ -135,6 +137,12 @@ class COMPOSITOR_EXPORT LayerAnimationElement {
SkColor color,
base::TimeDelta duration);
+ // Creates an element that transitions to the given color temperature. The
+ // caller owns the return value.
+ static std::unique_ptr<LayerAnimationElement> CreateTemperatureElement(
+ float temperature,
+ base::TimeDelta duration);
+
// Sets the start time for the animation. This must be called before the first
// call to {Start, IsFinished}. Once the animation is finished, this must
// be called again in order to restart the animation.
« no previous file with comments | « ui/compositor/layer_animation_delegate.h ('k') | ui/compositor/layer_animation_element.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698