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

Unified Diff: ui/compositor/layer.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 | « no previous file | 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 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.
« no previous file with comments | « no previous file | ui/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698