Cache gif colormap so make gif-loading faster 87/272687/3
authorEunki, Hong <eunkiki.hong@samsung.com>
Tue, 22 Mar 2022 12:56:36 +0000 (21:56 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Wed, 23 Mar 2022 13:49:52 +0000 (22:49 +0900)
commite63f0b0a7e8b69d21cff6a348153a1dfc293e123
treeb5fe6cf0c717729dd0ecc4a0aa402501859d8823
parent92144f335342483cd0b17a2c3997c685cc0417c3
Cache gif colormap so make gif-loading faster

gif type file only allow to hold 256 kind of color.

Previous code check the index of code, and next generate 1 integer.
(the function name as PixelLookup)
This patch pre-calculate the result of PixelLookup.
So we can reduce the bitwise operation + ColorMap access time.

Change-Id: I31f00a6a25b6669582d4edf86b2e7bd6d621a020
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali/internal/imaging/common/gif-loading.cpp