Implement inverted color cache in DarkModeFilter.
Implements cache for inverted colors using WTF::LruCache so that paint ops can use the cached values over calculating heavy invert color operations using color filters. With cache, the filter operations are improved by 15x to 20x if all colors are stored in cache and 20% to 30% if there are more colors than cache size. This patch improves the dark mode paint ops by 2%. Bug: 1060899 Change-Id: Ia9d1fe0912d50c72835f597a731be137169a6819 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2102388Reviewed-by:Xianzhu Wang <wangxianzhu@chromium.org> Reviewed-by:
Philip Rogers <pdr@chromium.org> Commit-Queue: Prashant Nevase <prashant.n@samsung.com> Cr-Commit-Position: refs/heads/master@{#774792}
Showing
Please register or sign in to comment