Add logic to clean up resources more frequently

Added call to Skia's performDeferredCleanup method
to free resources that were not referenced within
the last 100 frames or 10 seconds whichever is
furthest away

Bug: 188450217
Test: manual
Change-Id: I3f37e1b5bd01330dbbc2da4a84b1259d56be2768
diff --git a/libs/hwui/renderthread/CacheManager.h b/libs/hwui/renderthread/CacheManager.h
index 713ea99..af82672 100644
--- a/libs/hwui/renderthread/CacheManager.h
+++ b/libs/hwui/renderthread/CacheManager.h
@@ -23,6 +23,7 @@
 #include <SkSurface.h>
 #include <utils/String8.h>
 #include <vector>
+#include "utils/TimeUtils.h"
 
 namespace android {
 
@@ -53,6 +54,8 @@
     size_t getBackgroundCacheSize() const { return mBackgroundResourceBytes; }
     void onFrameCompleted();
 
+    void performDeferredCleanup(nsecs_t cleanupOlderThanMillis);
+
 private:
     friend class RenderThread;