Dynamically adjust renderahead

Tracks refresh rate changes and adjusts renderahead
based off of the active refresh rate.

Default is 60hz = 0 render ahead & > 70hz is render ahead 1

Bug: 127822449
Test: systraced stuff

Change-Id: I9849aa065262f21f7602d44cd1761373279dc28d
diff --git a/libs/hwui/DeviceInfo.h b/libs/hwui/DeviceInfo.h
index 2bab5d3..0e3f119 100644
--- a/libs/hwui/DeviceInfo.h
+++ b/libs/hwui/DeviceInfo.h
@@ -32,7 +32,7 @@
     PREVENT_COPY_AND_ASSIGN(DeviceInfo);
 
 public:
-    static const DeviceInfo* get();
+    static DeviceInfo* get();
 
     // this value is only valid after the GPU has been initialized and there is a valid graphics
     // context or if you are using the HWUI_NULL_GPU
@@ -40,6 +40,9 @@
     const DisplayInfo& displayInfo() const { return mDisplayInfo; }
     sk_sp<SkColorSpace> getWideColorSpace() const { return mWideColorSpace; }
     SkColorType getWideColorType() const { return mWideColorType; }
+    float getMaxRefreshRate() const { return mMaxRefreshRate; }
+
+    void onDisplayConfigChanged();
 
 private:
     friend class renderthread::RenderThread;
@@ -51,6 +54,7 @@
     DisplayInfo mDisplayInfo;
     sk_sp<SkColorSpace> mWideColorSpace;
     SkColorType mWideColorType;
+    const float mMaxRefreshRate;
 };
 
 } /* namespace uirenderer */