diff options
author | 2017-07-17 09:55:02 -0700 | |
---|---|---|
committer | 2017-08-10 17:22:43 +0000 | |
commit | 642ebea6e14b72c512ef1168dc6edb061035dded (patch) | |
tree | d2b562aefd9d4804a936f442422e6576c387f150 /libs/hwui/FontRenderer.cpp | |
parent | 15ea142044cd5212ed6fe86987297a64f0d7a4fb (diff) |
Delete all ro.hwui.* props
Remove all ro.hwui.* tuning props and instead
calculate them from the screen resolution.
Or just hardcode them to what all devices
were hardcoding them to anyway.
Bug: 63741221
Test: Check cache size results on sailfish
Change-Id: I8b0d210572a246f4fefb076935cf5156a70c274c
Merged-In: I8b0d210572a246f4fefb076935cf5156a70c274c
(cherry picked from commit 8dc02f99d09130ace2ee738c2e689db1b3f33181)
Diffstat (limited to 'libs/hwui/FontRenderer.cpp')
-rw-r--r-- | libs/hwui/FontRenderer.cpp | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/libs/hwui/FontRenderer.cpp b/libs/hwui/FontRenderer.cpp index ee99018fb652..bc4181075319 100644 --- a/libs/hwui/FontRenderer.cpp +++ b/libs/hwui/FontRenderer.cpp @@ -32,7 +32,6 @@ #include "utils/Timing.h" #include <algorithm> -#include <cutils/properties.h> #include <RenderScript.h> #include <SkGlyph.h> #include <SkUtils.h> @@ -99,22 +98,14 @@ FontRenderer::FontRenderer(const uint8_t* gammaTable) INIT_LOGD("Creating FontRenderer"); } - mSmallCacheWidth = property_get_int32(PROPERTY_TEXT_SMALL_CACHE_WIDTH, - DEFAULT_TEXT_SMALL_CACHE_WIDTH); - mSmallCacheHeight = property_get_int32(PROPERTY_TEXT_SMALL_CACHE_HEIGHT, - DEFAULT_TEXT_SMALL_CACHE_HEIGHT); + auto deviceInfo = DeviceInfo::get(); + int maxTextureSize = deviceInfo->maxTextureSize(); - mLargeCacheWidth = property_get_int32(PROPERTY_TEXT_LARGE_CACHE_WIDTH, - DEFAULT_TEXT_LARGE_CACHE_WIDTH); - mLargeCacheHeight = property_get_int32(PROPERTY_TEXT_LARGE_CACHE_HEIGHT, - DEFAULT_TEXT_LARGE_CACHE_HEIGHT); - - uint32_t maxTextureSize = (uint32_t) Caches::getInstance().maxTextureSize; - - mSmallCacheWidth = std::min(mSmallCacheWidth, maxTextureSize); - mSmallCacheHeight = std::min(mSmallCacheHeight, maxTextureSize); - mLargeCacheWidth = std::min(mLargeCacheWidth, maxTextureSize); - mLargeCacheHeight = std::min(mLargeCacheHeight, maxTextureSize); + // TODO: Most devices are hardcoded with this configuration, does it need to be dynamic? + mSmallCacheWidth = std::min(1024, maxTextureSize); + mSmallCacheHeight = std::min(1024, maxTextureSize); + mLargeCacheWidth = std::min(2048, maxTextureSize); + mLargeCacheHeight = std::min(1024, maxTextureSize); if (sLogFontRendererCreate) { INIT_LOGD(" Text cache sizes, in pixels: %i x %i, %i x %i, %i x %i, %i x %i", |