SF: introduce debug.sf.hwc.min.duration
debug.sf.hwc.min.duration can be set for specific devices to
indicate the shortest duration hwc will take to present a frame.
This value is used by SurfaceFlinger to calculate the
earlistPresentTime used for preventing an early present.
Bug: 190842189
Bug: 188854955
Test: SF unit tests
Test: run TouchLatency with debug.sf.hwc.min.duration set to a value
Change-Id: I8ffe92e5e6b355892c6bb073229f417fb0e9588c
diff --git a/services/surfaceflinger/Scheduler/VsyncModulator.h b/services/surfaceflinger/Scheduler/VsyncModulator.h
index fcde279..9410768 100644
--- a/services/surfaceflinger/Scheduler/VsyncModulator.h
+++ b/services/surfaceflinger/Scheduler/VsyncModulator.h
@@ -69,9 +69,12 @@
VsyncConfig early; // Used for early transactions, and during refresh rate change.
VsyncConfig earlyGpu; // Used during GPU composition.
VsyncConfig late; // Default.
+ std::chrono::nanoseconds hwcMinWorkDuration; // Used for calculating the
+ // earliest present time
bool operator==(const VsyncConfigSet& other) const {
- return early == other.early && earlyGpu == other.earlyGpu && late == other.late;
+ return early == other.early && earlyGpu == other.earlyGpu && late == other.late &&
+ hwcMinWorkDuration == other.hwcMinWorkDuration;
}
bool operator!=(const VsyncConfigSet& other) const { return !(*this == other); }