SF: hwvsync on for more samples on recalibration
Decrease the amount of time that the VSyncPredictor is using the
idealPeriod (ie, the hwc-reported period) by leaving hwVsync on until
there's enough info (4 additional pulses) to infer device's
measured/actual period.
This will benefit frames that come intermittently, as the vsync's
cumulative error over the larger time gap will be smaller, giving the
timer a better chance of landing closer to the vsync signal when those
one-off frames come in.
Test: 3 new unit tests, 2 other tests modified in substance.
Test: dogfooding
Test: uibench
Fixes: 159896971
Change-Id: Ic3190822e38c5a24d3445ea89ef6d7e34a590077
Merged-In: Ic3190822e38c5a24d3445ea89ef6d7e34a590077
(cherry picked from commit b818bfaf7b5bb2f62ed8af0a3ede300a8eb65e2f)
diff --git a/services/surfaceflinger/tests/unittests/VSyncDispatchRealtimeTest.cpp b/services/surfaceflinger/tests/unittests/VSyncDispatchRealtimeTest.cpp
index be49ef3..c2a7752 100644
--- a/services/surfaceflinger/tests/unittests/VSyncDispatchRealtimeTest.cpp
+++ b/services/surfaceflinger/tests/unittests/VSyncDispatchRealtimeTest.cpp
@@ -51,6 +51,7 @@
void setPeriod(nsecs_t) final {}
void resetModel() final {}
+ bool needsMoreSamples() const final { return false; }
void dump(std::string&) const final {}
private:
@@ -86,6 +87,7 @@
void setPeriod(nsecs_t) final {}
void resetModel() final {}
+ bool needsMoreSamples() const final { return false; }
void dump(std::string&) const final {}
private: