Loading libs/hwui/Caches.h +1 −1 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ static const GLsizei gMeshCount = 4; struct CacheLogger { CacheLogger() { LOGD("Creating caches"); LOGD("Creating OpenGL renderer caches"); } }; // struct CacheLogger Loading libs/hwui/Debug.h +9 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,9 @@ // Turn on to check for OpenGL errors on each frame #define DEBUG_OPENGL 1 // Turn on to enable initialization information #define DEBUG_INIT 0 // Turn on to enable memory usage summary on each frame #define DEBUG_MEMORY_USAGE 0 Loading Loading @@ -54,4 +57,10 @@ // Turn on to dump display list state #define DEBUG_DISPLAY_LIST 0 #if DEBUG_INIT #define INIT_LOGD(...) LOGD(__VA_ARGS__) #else #define INIT_LOGD(...) #endif #endif // ANDROID_HWUI_DEBUG_H libs/hwui/FboCache.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include <stdlib.h> #include "Debug.h" #include "FboCache.h" #include "Properties.h" Loading @@ -31,10 +32,10 @@ namespace uirenderer { FboCache::FboCache(): mMaxSize(DEFAULT_FBO_CACHE_SIZE) { char property[PROPERTY_VALUE_MAX]; if (property_get(PROPERTY_FBO_CACHE_SIZE, property, NULL) > 0) { LOGD(" Setting fbo cache size to %s", property); INIT_LOGD(" Setting fbo cache size to %s", property); mMaxSize = atoi(property); } else { LOGD(" Using default fbo cache size of %d", DEFAULT_FBO_CACHE_SIZE); INIT_LOGD(" Using default fbo cache size of %d", DEFAULT_FBO_CACHE_SIZE); } } Loading libs/hwui/FontRenderer.cpp +12 −5 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ #include <utils/Log.h> #include "Debug.h" #include "FontRenderer.h" namespace android { Loading Loading @@ -301,7 +302,9 @@ Font* Font::create(FontRenderer* state, uint32_t fontId, float fontSize, static bool sLogFontRendererCreate = true; FontRenderer::FontRenderer() { if (sLogFontRendererCreate) LOGD("Creating FontRenderer"); if (sLogFontRendererCreate) { INIT_LOGD("Creating FontRenderer"); } mGammaTable = NULL; mInitialized = false; Loading @@ -319,20 +322,24 @@ FontRenderer::FontRenderer() { char property[PROPERTY_VALUE_MAX]; if (property_get(PROPERTY_TEXT_CACHE_WIDTH, property, NULL) > 0) { if (sLogFontRendererCreate) LOGD(" Setting text cache width to %s pixels", property); if (sLogFontRendererCreate) { INIT_LOGD(" Setting text cache width to %s pixels", property); } mCacheWidth = atoi(property); } else { if (sLogFontRendererCreate) { LOGD(" Using default text cache width of %i pixels", mCacheWidth); INIT_LOGD(" Using default text cache width of %i pixels", mCacheWidth); } } if (property_get(PROPERTY_TEXT_CACHE_HEIGHT, property, NULL) > 0) { if (sLogFontRendererCreate) LOGD(" Setting text cache width to %s pixels", property); if (sLogFontRendererCreate) { INIT_LOGD(" Setting text cache width to %s pixels", property); } mCacheHeight = atoi(property); } else { if (sLogFontRendererCreate) { LOGD(" Using default text cache height of %i pixels", mCacheHeight); INIT_LOGD(" Using default text cache height of %i pixels", mCacheHeight); } } Loading libs/hwui/GammaFontRenderer.cpp +8 −7 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ #define LOG_TAG "OpenGLRenderer" #include "Debug.h" #include "GammaFontRenderer.h" #include "Properties.h" Loading @@ -27,7 +28,7 @@ namespace uirenderer { /////////////////////////////////////////////////////////////////////////////// GammaFontRenderer::GammaFontRenderer() { LOGD("Creating gamma font renderer"); INIT_LOGD("Creating gamma font renderer"); // Get the renderer properties char property[PROPERTY_VALUE_MAX]; Loading @@ -35,29 +36,29 @@ GammaFontRenderer::GammaFontRenderer() { // Get the gamma float gamma = DEFAULT_TEXT_GAMMA; if (property_get(PROPERTY_TEXT_GAMMA, property, NULL) > 0) { LOGD(" Setting text gamma to %s", property); INIT_LOGD(" Setting text gamma to %s", property); gamma = atof(property); } else { LOGD(" Using default text gamma of %.2f", DEFAULT_TEXT_GAMMA); INIT_LOGD(" Using default text gamma of %.2f", DEFAULT_TEXT_GAMMA); } // Get the black gamma threshold mBlackThreshold = DEFAULT_TEXT_BLACK_GAMMA_THRESHOLD; if (property_get(PROPERTY_TEXT_BLACK_GAMMA_THRESHOLD, property, NULL) > 0) { LOGD(" Setting text black gamma threshold to %s", property); INIT_LOGD(" Setting text black gamma threshold to %s", property); mBlackThreshold = atoi(property); } else { LOGD(" Using default text black gamma threshold of %d", INIT_LOGD(" Using default text black gamma threshold of %d", DEFAULT_TEXT_BLACK_GAMMA_THRESHOLD); } // Get the white gamma threshold mWhiteThreshold = DEFAULT_TEXT_WHITE_GAMMA_THRESHOLD; if (property_get(PROPERTY_TEXT_WHITE_GAMMA_THRESHOLD, property, NULL) > 0) { LOGD(" Setting text white gamma threshold to %s", property); INIT_LOGD(" Setting text white gamma threshold to %s", property); mWhiteThreshold = atoi(property); } else { LOGD(" Using default white black gamma threshold of %d", INIT_LOGD(" Using default white black gamma threshold of %d", DEFAULT_TEXT_WHITE_GAMMA_THRESHOLD); } Loading Loading
libs/hwui/Caches.h +1 −1 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ static const GLsizei gMeshCount = 4; struct CacheLogger { CacheLogger() { LOGD("Creating caches"); LOGD("Creating OpenGL renderer caches"); } }; // struct CacheLogger Loading
libs/hwui/Debug.h +9 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,9 @@ // Turn on to check for OpenGL errors on each frame #define DEBUG_OPENGL 1 // Turn on to enable initialization information #define DEBUG_INIT 0 // Turn on to enable memory usage summary on each frame #define DEBUG_MEMORY_USAGE 0 Loading Loading @@ -54,4 +57,10 @@ // Turn on to dump display list state #define DEBUG_DISPLAY_LIST 0 #if DEBUG_INIT #define INIT_LOGD(...) LOGD(__VA_ARGS__) #else #define INIT_LOGD(...) #endif #endif // ANDROID_HWUI_DEBUG_H
libs/hwui/FboCache.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include <stdlib.h> #include "Debug.h" #include "FboCache.h" #include "Properties.h" Loading @@ -31,10 +32,10 @@ namespace uirenderer { FboCache::FboCache(): mMaxSize(DEFAULT_FBO_CACHE_SIZE) { char property[PROPERTY_VALUE_MAX]; if (property_get(PROPERTY_FBO_CACHE_SIZE, property, NULL) > 0) { LOGD(" Setting fbo cache size to %s", property); INIT_LOGD(" Setting fbo cache size to %s", property); mMaxSize = atoi(property); } else { LOGD(" Using default fbo cache size of %d", DEFAULT_FBO_CACHE_SIZE); INIT_LOGD(" Using default fbo cache size of %d", DEFAULT_FBO_CACHE_SIZE); } } Loading
libs/hwui/FontRenderer.cpp +12 −5 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ #include <utils/Log.h> #include "Debug.h" #include "FontRenderer.h" namespace android { Loading Loading @@ -301,7 +302,9 @@ Font* Font::create(FontRenderer* state, uint32_t fontId, float fontSize, static bool sLogFontRendererCreate = true; FontRenderer::FontRenderer() { if (sLogFontRendererCreate) LOGD("Creating FontRenderer"); if (sLogFontRendererCreate) { INIT_LOGD("Creating FontRenderer"); } mGammaTable = NULL; mInitialized = false; Loading @@ -319,20 +322,24 @@ FontRenderer::FontRenderer() { char property[PROPERTY_VALUE_MAX]; if (property_get(PROPERTY_TEXT_CACHE_WIDTH, property, NULL) > 0) { if (sLogFontRendererCreate) LOGD(" Setting text cache width to %s pixels", property); if (sLogFontRendererCreate) { INIT_LOGD(" Setting text cache width to %s pixels", property); } mCacheWidth = atoi(property); } else { if (sLogFontRendererCreate) { LOGD(" Using default text cache width of %i pixels", mCacheWidth); INIT_LOGD(" Using default text cache width of %i pixels", mCacheWidth); } } if (property_get(PROPERTY_TEXT_CACHE_HEIGHT, property, NULL) > 0) { if (sLogFontRendererCreate) LOGD(" Setting text cache width to %s pixels", property); if (sLogFontRendererCreate) { INIT_LOGD(" Setting text cache width to %s pixels", property); } mCacheHeight = atoi(property); } else { if (sLogFontRendererCreate) { LOGD(" Using default text cache height of %i pixels", mCacheHeight); INIT_LOGD(" Using default text cache height of %i pixels", mCacheHeight); } } Loading
libs/hwui/GammaFontRenderer.cpp +8 −7 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ #define LOG_TAG "OpenGLRenderer" #include "Debug.h" #include "GammaFontRenderer.h" #include "Properties.h" Loading @@ -27,7 +28,7 @@ namespace uirenderer { /////////////////////////////////////////////////////////////////////////////// GammaFontRenderer::GammaFontRenderer() { LOGD("Creating gamma font renderer"); INIT_LOGD("Creating gamma font renderer"); // Get the renderer properties char property[PROPERTY_VALUE_MAX]; Loading @@ -35,29 +36,29 @@ GammaFontRenderer::GammaFontRenderer() { // Get the gamma float gamma = DEFAULT_TEXT_GAMMA; if (property_get(PROPERTY_TEXT_GAMMA, property, NULL) > 0) { LOGD(" Setting text gamma to %s", property); INIT_LOGD(" Setting text gamma to %s", property); gamma = atof(property); } else { LOGD(" Using default text gamma of %.2f", DEFAULT_TEXT_GAMMA); INIT_LOGD(" Using default text gamma of %.2f", DEFAULT_TEXT_GAMMA); } // Get the black gamma threshold mBlackThreshold = DEFAULT_TEXT_BLACK_GAMMA_THRESHOLD; if (property_get(PROPERTY_TEXT_BLACK_GAMMA_THRESHOLD, property, NULL) > 0) { LOGD(" Setting text black gamma threshold to %s", property); INIT_LOGD(" Setting text black gamma threshold to %s", property); mBlackThreshold = atoi(property); } else { LOGD(" Using default text black gamma threshold of %d", INIT_LOGD(" Using default text black gamma threshold of %d", DEFAULT_TEXT_BLACK_GAMMA_THRESHOLD); } // Get the white gamma threshold mWhiteThreshold = DEFAULT_TEXT_WHITE_GAMMA_THRESHOLD; if (property_get(PROPERTY_TEXT_WHITE_GAMMA_THRESHOLD, property, NULL) > 0) { LOGD(" Setting text white gamma threshold to %s", property); INIT_LOGD(" Setting text white gamma threshold to %s", property); mWhiteThreshold = atoi(property); } else { LOGD(" Using default white black gamma threshold of %d", INIT_LOGD(" Using default white black gamma threshold of %d", DEFAULT_TEXT_WHITE_GAMMA_THRESHOLD); } Loading