Cache animated image's frame index 94/274094/17
authorEunki, Hong <eunkiki.hong@samsung.com>
Thu, 21 Apr 2022 07:34:31 +0000 (16:34 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Thu, 12 May 2022 12:25:02 +0000 (21:25 +0900)
commitdd5c89d78423e23ca27708cabfd0d88ce798b294
treeb6ebf4570f274e77cab472219e699ee4dcee0c80
parent40455b5d07b94320ec953a906f861bd9d6a367f4
Cache animated image's frame index

There is no reason to multiple decoding for same-image's same-frame loading.
It just increase our memory useage and CPU usage.

This patch cache animated image's frame index so
we can re-use already decoded frame informations.

+

For more, Due to the animated image decoding can hold big amount of observers
in one frame, we need to reduce runtime of NotifyObservers API.
This patch also reduce NotifyObservers time complexity from O(N^2) to O(N).
Note : We can't add additional observer due to the mQueueLoadFlag flag is true.

Change-Id: I829704c638ce7b6a5feca13cc1bcf75b4bd9e35e
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
automated-tests/src/dali-toolkit/utc-Dali-AnimatedImageVisual.cpp
dali-toolkit/internal/texture-manager/texture-cache-manager.cpp
dali-toolkit/internal/texture-manager/texture-cache-manager.h
dali-toolkit/internal/texture-manager/texture-manager-impl.cpp
dali-toolkit/internal/texture-manager/texture-manager-impl.h
dali-toolkit/internal/visuals/animated-image/rolling-animated-image-cache.cpp
dali-toolkit/internal/visuals/animated-image/rolling-animated-image-cache.h