HWUI: calculate used memory in FontCache for gfxinfo
bug:30427106
Change-Id: I653571d6a4e974e975fb0dc03fc2364eecbf2f84
diff --git a/libs/hwui/FontRenderer.h b/libs/hwui/FontRenderer.h
index e10a81b..e102a2f 100644
--- a/libs/hwui/FontRenderer.h
+++ b/libs/hwui/FontRenderer.h
@@ -23,6 +23,7 @@
#include "font/Font.h"
#include <utils/LruCache.h>
+#include <utils/String8.h>
#include <utils/StrongPointer.h>
#include <SkPaint.h>
@@ -132,7 +133,8 @@
mLinearFiltering = linearFiltering;
}
- uint32_t getCacheSize(GLenum format) const;
+ uint32_t getSize() const;
+ void dumpMemoryUsage(String8& log) const;
private:
friend class Font;
@@ -175,6 +177,10 @@
mUploadTexture = true;
}
+ const std::vector<CacheTexture*>& cacheTexturesForFormat(GLenum format) const;
+ uint32_t getCacheSize(GLenum format) const;
+ uint32_t getFreeCacheSize(GLenum format) const;
+
uint32_t mSmallCacheWidth;
uint32_t mSmallCacheHeight;
uint32_t mLargeCacheWidth;