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/BufferLayer.cpp b/services/surfaceflinger/BufferLayer.cpp
index 06caf1e..ba0f160 100644
--- a/services/surfaceflinger/BufferLayer.cpp
+++ b/services/surfaceflinger/BufferLayer.cpp
@@ -97,8 +97,11 @@
 }
 
 bool BufferLayer::isVisible() const {
-    return !(isHiddenByPolicy()) && getAlpha() > 0.0f &&
+    bool visible = !(isHiddenByPolicy()) && getAlpha() > 0.0f &&
             (mActiveBuffer != nullptr || mSidebandStream != nullptr);
+    mFlinger->mScheduler->setLayerVisibility(mSchedulerLayerHandle, visible);
+
+    return visible;
 }
 
 bool BufferLayer::isFixedSize() const {