summaryrefslogtreecommitdiff
path: root/cmds/bootanimation/BootAnimationUtil.cpp
diff options
context:
space:
mode:
author Jernej Virag <jernej@google.com> 2023-04-19 14:19:54 +0200
committer Cherrypicker Worker <android-build-cherrypicker-worker@google.com> 2023-04-20 09:05:18 +0000
commit39dbe90004924912f49e141b2051bc27752f7c1a (patch)
treefc07a57f4ca776c0fd72eb98ced87d2d8e8b91bb /cmds/bootanimation/BootAnimationUtil.cpp
parentf54e5f90805b715c3acba0ddcab2923df042122e (diff)
Restrict maximum size of FontInterpolator font caches
This fixes a memory leak where Fonts were leaked within detailed lock screen animations. We're occasionally animating fonts via several axes which causes a low occurence of cache hits. This resulted in hundreds of Font instances being kept in the cache. Bug: 275486055 Test: Verified behaviour on cheetah Expanded and ran unit tests for affected classes Benchmarked rendering time with reduced cache - increase of duration of draw() command for 0.3ms with 10 item cache. 50 item cache increased draw() command duration for 0.15ms on average which is not worth the tradeoff in memory. (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b7bc5640491d0a4cc0fd6c02f73c82912b1e3996) Merged-In: Id6e2b127f44f5e553ff7ac4ba640fd4f6f4698b0 Change-Id: Id6e2b127f44f5e553ff7ac4ba640fd4f6f4698b0
Diffstat (limited to 'cmds/bootanimation/BootAnimationUtil.cpp')
0 files changed, 0 insertions, 0 deletions