SurfaceFlinger: Force HDR content on DEFAULT refresh rate
Do not allow Performance Refresh Rate when displaying HDR content.
Test: HDR Video on YouTube
Bug: 129694529
Change-Id: Ic9b5801d3a4c8b06964e0c4dcec95ef214ebedc6
diff --git a/services/surfaceflinger/Scheduler/LayerHistory.h b/services/surfaceflinger/Scheduler/LayerHistory.h
index 39061e7..adc5ce5 100644
--- a/services/surfaceflinger/Scheduler/LayerHistory.h
+++ b/services/surfaceflinger/Scheduler/LayerHistory.h
@@ -56,10 +56,13 @@
std::unique_ptr<LayerHandle> createLayer(const std::string name, float maxRefreshRate);
// Method for inserting layers and their requested present time into the unordered map.
- void insert(const std::unique_ptr<LayerHandle>& layerHandle, nsecs_t presentTime);
+ void insert(const std::unique_ptr<LayerHandle>& layerHandle, nsecs_t presentTime, bool isHdr);
+ // Method for setting layer visibility
+ void setVisibility(const std::unique_ptr<LayerHandle>& layerHandle, bool visible);
+
// Returns the desired refresh rate, which is a max refresh rate of all the current
// layers. See go/content-fps-detection-in-scheduler for more information.
- float getDesiredRefreshRate();
+ std::pair<float, bool> getDesiredRefreshRateAndHDR();
// Removes the handle and the object from the map.
void destroyLayer(const int64_t id);