summaryrefslogtreecommitdiff
path: root/libs/androidfw/include
diff options
context:
space:
mode:
author Yurii Zubrytskyi <zyy@google.com> 2022-11-14 22:06:30 -0800
committer Yurii Zubrytskyi <zyy@google.com> 2022-11-30 17:46:44 -0800
commit591895bd28f3073dfeebf6bcfb0fc18491e54809 (patch)
treeb3db85ce2996201176f2e88fc279de0909627524 /libs/androidfw/include
parent801c44115ecdee5511160f1837b514dd274f6a32 (diff)
[res] Split keys and values in Theme::Entry vector
Having keys in a separate vector improves memory usage (because of a 4-byte padding in the original struct that's gone) and performance (much better cache utilization when searching only through the keys) Test: build + UTs + boot Bug: 237583012 Change-Id: I5ed3bada42fabfc30dfe5de39946ee5bbab22899
Diffstat (limited to 'libs/androidfw/include')
-rw-r--r--libs/androidfw/include/androidfw/AssetManager2.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/androidfw/include/androidfw/AssetManager2.h b/libs/androidfw/include/androidfw/AssetManager2.h
index e9aaedc229d6..c933fb38a22d 100644
--- a/libs/androidfw/include/androidfw/AssetManager2.h
+++ b/libs/androidfw/include/androidfw/AssetManager2.h
@@ -571,6 +571,7 @@ class Theme {
AssetManager2* asset_manager_ = nullptr;
uint32_t type_spec_flags_ = 0u;
+ std::vector<uint32_t> keys_;
std::vector<Entry> entries_;
};