HWUI: track upload & recent usage in font cache

FontCacheHistoryTracker should be turned off before shipping: b/31438876

bug:30427106
Change-Id: Ic26b25e790d4ee69e484ca0cb23dc9cc522b2ed3
diff --git a/libs/hwui/Android.mk b/libs/hwui/Android.mk
index 366ef71..74b474e 100644
--- a/libs/hwui/Android.mk
+++ b/libs/hwui/Android.mk
@@ -3,6 +3,7 @@
 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
 
 HWUI_NEW_OPS := true
+BUGREPORT_FONT_CACHE_USAGE := true
 
 # Enables fine-grained GLES error checking
 # If set to true, every GLES call is wrapped & error checked
@@ -135,6 +136,13 @@
 
 endif
 
+ifeq (true, $(BUGREPORT_FONT_CACHE_USAGE))
+    hwui_src_files += \
+        font/FontCacheHistoryTracker.cpp
+    hwui_cflags += -DBUGREPORT_FONT_CACHE_USAGE
+endif
+
+
 ifndef HWUI_COMPILE_SYMBOLS
     hwui_cflags += -fvisibility=hidden
 endif