Don't attempt to create empty layers.
Bug #3369888
Change-Id: Ic17bbd1c04bbf760cb17d0eb9e6767fd6479948c
diff --git a/libs/hwui/FontRenderer.cpp b/libs/hwui/FontRenderer.cpp
index c080501..c43e40d 100644
--- a/libs/hwui/FontRenderer.cpp
+++ b/libs/hwui/FontRenderer.cpp
@@ -298,8 +298,10 @@
// FontRenderer
///////////////////////////////////////////////////////////////////////////////
+static bool sLogFontRendererCreate = true;
+
FontRenderer::FontRenderer() {
- LOGD("Creating FontRenderer");
+ if (sLogFontRendererCreate) LOGD("Creating FontRenderer");
mGammaTable = NULL;
mInitialized = false;
@@ -317,18 +319,24 @@
char property[PROPERTY_VALUE_MAX];
if (property_get(PROPERTY_TEXT_CACHE_WIDTH, property, NULL) > 0) {
- LOGD(" Setting text cache width to %s pixels", property);
+ if (sLogFontRendererCreate) LOGD(" Setting text cache width to %s pixels", property);
mCacheWidth = atoi(property);
} else {
- LOGD(" Using default text cache width of %i pixels", mCacheWidth);
+ if (sLogFontRendererCreate) {
+ LOGD(" Using default text cache width of %i pixels", mCacheWidth);
+ }
}
if (property_get(PROPERTY_TEXT_CACHE_HEIGHT, property, NULL) > 0) {
- LOGD(" Setting text cache width to %s pixels", property);
+ if (sLogFontRendererCreate) LOGD(" Setting text cache width to %s pixels", property);
mCacheHeight = atoi(property);
} else {
- LOGD(" Using default text cache height of %i pixels", mCacheHeight);
+ if (sLogFontRendererCreate) {
+ LOGD(" Using default text cache height of %i pixels", mCacheHeight);
+ }
}
+
+ sLogFontRendererCreate = false;
}
FontRenderer::~FontRenderer() {