drm_hwcomposer: Add VSyncWorker::GetNextVsyncTimestamp
Add a function to approximate when the next vsync after a given
timestamp will be.
This can be used to support expectedPresentTime functionality to
determine if a pending property set should be committed immediately or
for a future vsync.
Change-Id: I6b1f0182d3416b0ffa361f54e6695b2894eb842a
Signed-off-by: Drew Davenport <ddavenport@google.com>
diff --git a/drm/VSyncWorker.h b/drm/VSyncWorker.h
index 8e410f4..e8ed24b 100644
--- a/drm/VSyncWorker.h
+++ b/drm/VSyncWorker.h
@@ -50,6 +50,10 @@
void SetVsyncTimestampTracking(bool enabled);
uint32_t GetLastVsyncTimestamp();
+ // Get the next predicted vsync timestamp after |time|, based on the last
+ // recorded vsync timestamp and the current vsync period.
+ int64_t GetNextVsyncTimestamp(int64_t time);
+
void StopThread();
private: