Add plumbing for upcoming setFrameRate() api
Add plumbing from the app to surface flinger for the
ANativeWindow_setFrameRate() and ASurfaceTransaction_setFrameRate() api
calls we'll be adding soon.
We don't do anything in surface flinger with this data yet.
Bug: 143912624
Test: Added a new test, SetFrameRateTest.
Change-Id: I1cab87f3ce5afca4591a39d8e7a42cb1e86a368f
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index b8a3539..0253098 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -224,6 +224,8 @@
// Priority of the layer assigned by Window Manager.
int32_t frameRateSelectionPriority;
+
+ float frameRate;
};
explicit Layer(const LayerCreationArgs& args);
@@ -737,6 +739,9 @@
*/
Rect getCroppedBufferSize(const Layer::State& s) const;
+ virtual bool setFrameRate(float frameRate);
+ virtual float getFrameRate() const;
+
protected:
// constant
sp<SurfaceFlinger> mFlinger;