SF: Offsets should be dependend on the refresh rate.

When switching to 90Hz, the time between vsync pulses is only 11ms, so it
doesn't make sense to have 6msec offsets. Adding the flags will allow us
to experiment with different offsets in the later stages through device.mk
file for two different refresh rates. Eventually, the refresh rates should
be coupled with the configs that indicate the refresh rate.

Bug: 122905996
Test: Added Fake class to inject into tests to keep consistant results.
Change-Id: Iffe7eb9dae6cd655c83e5b576306e3883ef1a56d
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 4d84144..716e3dc 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -59,6 +59,7 @@
 #include "Scheduler/DispSync.h"
 #include "Scheduler/EventThread.h"
 #include "Scheduler/MessageQueue.h"
+#include "Scheduler/PhaseOffsets.h"
 #include "Scheduler/RefreshRateStats.h"
 #include "Scheduler/Scheduler.h"
 #include "Scheduler/VSyncModulator.h"
@@ -942,7 +943,10 @@
     std::unique_ptr<EventControlThread> mEventControlThread;
     std::unordered_map<DisplayId, sp<IBinder>> mPhysicalDisplayTokens;
 
+    // Calculates correct offsets.
     VSyncModulator mVsyncModulator;
+    // Keeps track of all available phase offsets for different refresh types.
+    std::unique_ptr<scheduler::PhaseOffsets> mPhaseOffsets;
 
     // Can only accessed from the main thread, these members
     // don't need synchronization