diff options
Diffstat (limited to 'libs/hwui/FontRenderer.h')
| -rw-r--r-- | libs/hwui/FontRenderer.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/libs/hwui/FontRenderer.h b/libs/hwui/FontRenderer.h index 578beaa424b1..e836c20bbf9c 100644 --- a/libs/hwui/FontRenderer.h +++ b/libs/hwui/FontRenderer.h @@ -20,8 +20,12 @@ #include "font/CacheTexture.h" #include "font/CachedGlyphInfo.h" #include "font/Font.h" +#ifdef BUGREPORT_FONT_CACHE_USAGE +#include "font/FontCacheHistoryTracker.h" +#endif #include <utils/LruCache.h> +#include <utils/String8.h> #include <utils/StrongPointer.h> #include <SkPaint.h> @@ -117,7 +121,12 @@ public: mLinearFiltering = linearFiltering; } - uint32_t getCacheSize(GLenum format) const; + uint32_t getSize() const; + void dumpMemoryUsage(String8& log) const; + +#ifdef BUGREPORT_FONT_CACHE_USAGE + FontCacheHistoryTracker& historyTracker() { return mHistoryTracker; } +#endif private: friend class Font; @@ -160,6 +169,10 @@ private: 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; @@ -184,6 +197,10 @@ private: bool mLinearFiltering; +#ifdef BUGREPORT_FONT_CACHE_USAGE + FontCacheHistoryTracker mHistoryTracker; +#endif + #ifdef ANDROID_ENABLE_RENDERSCRIPT // RS constructs RSC::sp<RSC::RS> mRs; |