summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/Scheduler/VSyncTracker.h
diff options
context:
space:
mode:
Diffstat (limited to 'services/surfaceflinger/Scheduler/VSyncTracker.h')
-rw-r--r--services/surfaceflinger/Scheduler/VSyncTracker.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/services/surfaceflinger/Scheduler/VSyncTracker.h b/services/surfaceflinger/Scheduler/VSyncTracker.h
index 05a6fc3a8d..95750ad5cc 100644
--- a/services/surfaceflinger/Scheduler/VSyncTracker.h
+++ b/services/surfaceflinger/Scheduler/VSyncTracker.h
@@ -17,6 +17,7 @@
#pragma once
#include <utils/Timers.h>
+#include "Fps.h"
#include "VSyncDispatch.h"
namespace android::scheduler {
@@ -66,6 +67,16 @@ public:
/* Inform the tracker that the samples it has are not accurate for prediction. */
virtual void resetModel() = 0;
+ virtual bool needsMoreSamples() const = 0;
+
+ /*
+ * Checks if a vsync timestamp is in phase for a frame rate
+ *
+ * \param [in] timePoint A vsync timestamp
+ * \param [in] frameRate The frame rate to check for
+ */
+ virtual bool isVSyncInPhase(nsecs_t timePoint, Fps frameRate) const = 0;
+
virtual void dump(std::string& result) const = 0;
protected: