diff options
author | 2017-07-17 09:55:02 -0700 | |
---|---|---|
committer | 2017-07-19 17:24:03 -0700 | |
commit | 8dc02f99d09130ace2ee738c2e689db1b3f33181 (patch) | |
tree | fc3ea85ec012dd56ddad8791460352c7d1e6d7c1 /libs/hwui/DeviceInfo.h | |
parent | e3a9b8a3505e127143075de876de5e13d3677e46 (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
Diffstat (limited to 'libs/hwui/DeviceInfo.h')
-rw-r--r-- | libs/hwui/DeviceInfo.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/hwui/DeviceInfo.h b/libs/hwui/DeviceInfo.h index aff84b02d85a..5bd7b14b156d 100644 --- a/libs/hwui/DeviceInfo.h +++ b/libs/hwui/DeviceInfo.h @@ -16,7 +16,10 @@ #ifndef DEVICEINFO_H #define DEVICEINFO_H +#include <ui/DisplayInfo.h> + #include "utils/Macros.h" +#include "Extensions.h" namespace android { namespace uirenderer { @@ -35,14 +38,24 @@ public: static void initialize(int maxTextureSize); int maxTextureSize() const { return mMaxTextureSize; } + const DisplayInfo& displayInfo() const { return mDisplayInfo; } + const Extensions& extensions() const { return mExtensions; } + + static uint32_t multiplyByResolution(uint32_t in) { + auto di = DeviceInfo::get()->displayInfo(); + return di.w * di.h * in; + } private: DeviceInfo() {} ~DeviceInfo() {} void load(); + void loadDisplayInfo(); int mMaxTextureSize; + DisplayInfo mDisplayInfo; + Extensions mExtensions; }; } /* namespace uirenderer */ |