From: Eunki, Hong Date: Fri, 11 Feb 2022 13:36:39 +0000 (+0900) Subject: Refactoring TextureManager cache as Dali::FreeList X-Git-Tag: dali_2.1.21~6 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=b33712a17095254f5a42eb2458c7e2f840fd8a13;hp=b33712a17095254f5a42eb2458c7e2f840fd8a13 Refactoring TextureManager cache as Dali::FreeList Apply additional container as Dali::FreeList as TextureIdConverter; From TextureId to TextureCacheIndex. and add mTextureHashContainer, key is TextureHash and value is list of TextureId. These things will make us access mTextureInfoContainer more faster. Previous code iterate whole std::vector list to find cached texture. This patch make we can get cacheIndex from textureId as O(1) by Dali::FreeList and get textureId from textureHash as O(1 * collision) by std::unordered_map>. This patch make TextureCacheIndex as a kind of structure. named TextureCacheIndexData. This data use 4 bit as "TextueCacheIndexType" and 28 bit as "Index". By this structure, we can use only one TextureIdConverter. We can know what this TextureId come from ; NormalImage or ExternalTextures or EncodedImageBuffer. So now, we can do all API things as near O(1). Without useless iteratating. It will reduce ImageView's SceneOn and SceneOff time. And also, reduce AsyncLoadComplete API runtime, that animated image used every image frame. Note : After this patch, TextureId will not be unique anymore. TODO : Masking feature still works on O(N). We need to make new container for it in future. Change-Id: I37777ccc05fc0541e1f0e65f1d6306d9436c1245 Signed-off-by: Eunki, Hong ---