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. Change-Id: Id6e2b127f44f5e553ff7ac4ba640fd4f6f4698b0
Loading
Please register or sign in to comment