SurfaceFlinger: always consider layers with setFrameRate
If an app called to setFrameRate on a layer, consider it when choosing
the refresh rate, even if the layer has posted buffers.
Bug: 152411921
Test: adb shell /data/nativetest64/libsurfaceflinger_unittest/libsurfaceflinger_unittest
Change-Id: I01f139b34cee01255693ed274225e79d83b0f894
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 5039761..f9dff12 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -1384,6 +1384,9 @@
return false;
}
+ // Activate the layer in Scheduler's LayerHistory
+ mFlinger->mScheduler->recordLayerHistory(this, systemTime());
+
mCurrentState.sequence++;
mCurrentState.frameRate = frameRate;
mCurrentState.modified = true;