Skip to content
Commit b7bc5640 authored by Jernej Virag's avatar Jernej Virag Committed by Hawkwood Glazier
Browse files

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
parent 0889fb51
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment