Allow triming of font caches through WindowManager

This allows triming of Skia font caches when an app created a lot of
transient font allocations and it knows that it won't need it anymore.
This is primarily meant for persistent processes like SystemUI to avoid
font caches taking up memory after they're not needed anymore.

Bug: 275486055
Test: Tested as part of a follow-up commit, ran
     LockscreenWithSwipeMicrobenchmark which showed a noticable
     reduction of RSS+anon memory use after unlock.
Change-Id: I6d80003d8baab35cb2ca858d4e4d4696b32f3adf
diff --git a/libs/hwui/renderthread/RenderThread.cpp b/libs/hwui/renderthread/RenderThread.cpp
index 9ba67a2..eb28c08 100644
--- a/libs/hwui/renderthread/RenderThread.cpp
+++ b/libs/hwui/renderthread/RenderThread.cpp
@@ -521,6 +521,11 @@
     cacheManager().trimMemory(level);
 }
 
+void RenderThread::trimCaches(CacheTrimLevel level) {
+    ATRACE_CALL();
+    cacheManager().trimCaches(level);
+}
+
 } /* namespace renderthread */
 } /* namespace uirenderer */
 } /* namespace android */