Index: ui/compositor/layer.h |
diff --git a/ui/compositor/layer.h b/ui/compositor/layer.h |
index a97525d03f1064451efea4386ec45f024d7dd408..89602807c8cfc58626b3b81f10f9e7de684fc8e4 100644 |
--- a/ui/compositor/layer.h |
+++ b/ui/compositor/layer.h |
@@ -186,6 +186,11 @@ class COMPOSITOR_EXPORT Layer |
// the combined opacity of the parent. |
float GetCombinedOpacity() const; |
+ // The layer temperature value between 0.0f and 1.0f, where a value of 0.0f |
+ // is least warm (which is the default), and a value of 1.0f is most warm. |
+ float layer_temperature() const { return layer_temperature_; } |
+ void SetLayerTemperature(float value); |
+ |
// Blur pixels by this amount in anything below the layer and visible through |
// the layer. |
int background_blur() const { return background_blur_radius_; } |
@@ -421,6 +426,7 @@ class COMPOSITOR_EXPORT Layer |
void SetBrightnessFromAnimation(float brightness) override; |
void SetGrayscaleFromAnimation(float grayscale) override; |
void SetColorFromAnimation(SkColor color) override; |
+ void SetTemperatureFromAnimation(float temperature) override; |
void ScheduleDrawForAnimation() override; |
const gfx::Rect& GetBoundsForAnimation() const override; |
gfx::Transform GetTransformForAnimation() const override; |
@@ -429,6 +435,7 @@ class COMPOSITOR_EXPORT Layer |
float GetBrightnessForAnimation() const override; |
float GetGrayscaleForAnimation() const override; |
SkColor GetColorForAnimation() const override; |
+ float GetTemperatureFromAnimation() const override; |
float GetDeviceScaleFactor() const override; |
cc::Layer* GetCcLayer() const override; |
LayerThreadedAnimationDelegate* GetThreadedAnimationDelegate() override; |
@@ -499,6 +506,14 @@ class COMPOSITOR_EXPORT Layer |
float layer_grayscale_; |
bool layer_inverted_; |
+ // The global color temperature value (0.0f ~ 1.0f). Used to calculate the |
+ // layer blue and green colors scales. 0.0f is least warm (default), and 1.0f |
+ // is most warm. |
+ float layer_temperature_; |
+ // The calculated layer blue and green color scales (0.0f ~ 1.0f). |
+ float layer_blue_scale_; |
+ float layer_green_scale_; |
+ |
// The associated mask layer with this layer. |
Layer* layer_mask_; |
// The back link from the mask layer to it's associated masked layer. |