summaryrefslogtreecommitdiff
path: root/libs/hwui/FontRenderer.h
diff options
context:
space:
mode:
author sergeyv <sergeyv@google.com> 2016-09-14 00:43:43 -0700
committer sergeyv <sergeyv@google.com> 2016-09-14 09:15:15 -0700
commitdcbc0e9e25bf99600d487f3c6f5e26487545cd9c (patch)
tree55e9803b11d2f1d153f6890c66e9d4a551a15362 /libs/hwui/FontRenderer.h
parent182f9abdf427996249cb953ffd6133fde3bbfba2 (diff)
parent0ec2fd7bc5f3c57f7783425608732d2f95f53c4a (diff)
resolve merge conflicts of 0ec2fd7 to master
Change-Id: I113ede26ab42e3f9a36a52a756c38d365731e16d
Diffstat (limited to 'libs/hwui/FontRenderer.h')
-rw-r--r--libs/hwui/FontRenderer.h19
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;