summaryrefslogtreecommitdiffstats
path: root/libs/hwui/GammaFontRenderer.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/GammaFontRenderer.h')
-rw-r--r--libs/hwui/GammaFontRenderer.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/libs/hwui/GammaFontRenderer.h b/libs/hwui/GammaFontRenderer.h
index b59ae81..96d960c 100644
--- a/libs/hwui/GammaFontRenderer.h
+++ b/libs/hwui/GammaFontRenderer.h
@@ -29,6 +29,22 @@ struct GammaFontRenderer {
FontRenderer& getFontRenderer(const SkPaint* paint);
+ uint32_t getFontRendererCount() const {
+ return 3;
+ }
+
+ uint32_t getFontRendererSize(uint32_t fontRenderer) const {
+ switch (fontRenderer) {
+ case 0:
+ return mDefaultRenderer.getCacheHeight() * mDefaultRenderer.getCacheWidth();
+ case 1:
+ return mBlackGammaRenderer.getCacheHeight() * mBlackGammaRenderer.getCacheWidth();
+ case 2:
+ return mWhiteGammaRenderer.getCacheHeight() * mWhiteGammaRenderer.getCacheWidth();
+ }
+ return 0;
+ }
+
private:
FontRenderer mDefaultRenderer;
FontRenderer mBlackGammaRenderer;