diff options
| author | 2017-08-10 22:09:13 +0000 | |
|---|---|---|
| committer | 2017-08-10 22:09:13 +0000 | |
| commit | 27140b03bfee16f3fdb70be42ff4fc132fc4c84a (patch) | |
| tree | dd3ef3a708ba7420b93f75d75ee241e485e77a45 /libs/hwui/TextureCache.cpp | |
| parent | 20933d045431c498ddaa975c75f93136f557b48f (diff) | |
| parent | eb43cdbc2e1187667a51cf21daac9e79e3678114 (diff) | |
Merge "Delete all ro.hwui.* props" into oc-mr1-dev
am: eb43cdbc2e
Change-Id: I4e3680df1f475bc6f15ff8c3ab0bdc8b887607a3
Diffstat (limited to 'libs/hwui/TextureCache.cpp')
| -rw-r--r-- | libs/hwui/TextureCache.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libs/hwui/TextureCache.cpp b/libs/hwui/TextureCache.cpp index 710cdd9286e8..6fe3606a7576 100644 --- a/libs/hwui/TextureCache.cpp +++ b/libs/hwui/TextureCache.cpp @@ -24,6 +24,7 @@ #include "Properties.h" #include "utils/TraceUtils.h" #include "hwui/Bitmap.h" +#include "DeviceInfo.h" namespace android { namespace uirenderer { @@ -35,13 +36,10 @@ namespace uirenderer { TextureCache::TextureCache() : mCache(LruCache<uint32_t, Texture*>::kUnlimitedCapacity) , mSize(0) - , mMaxSize(Properties::textureCacheSize) - , mFlushRate(Properties::textureCacheFlushRate) { + , mMaxSize(DeviceInfo::multiplyByResolution(4 * 6)) // 6 screen-sized RGBA_8888 bitmaps + , mFlushRate(.4f) { mCache.setOnEntryRemovedListener(this); - - glGetIntegerv(GL_MAX_TEXTURE_SIZE, &mMaxTextureSize); - INIT_LOGD(" Maximum texture dimension is %d pixels", mMaxTextureSize); - + mMaxTextureSize = DeviceInfo::get()->maxTextureSize(); mDebugEnabled = Properties::debugLevel & kDebugCaches; } |