diff options
author | Scott Mertz <scott@cyngn.com> | 2016-08-02 11:06:46 -0700 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2016-08-04 23:57:52 -0700 |
commit | 66af012f8b1e8adb18132a669d2ed2e81d7bdf42 (patch) | |
tree | 9cef29c0a0cea664e746208446018f1c4cf2f102 /core/java | |
parent | 88e7a6c7fcaf71d6dae2b9067db19aaeba7de39b (diff) | |
download | frameworks_base-66af012f8b1e8adb18132a669d2ed2e81d7bdf42.zip frameworks_base-66af012f8b1e8adb18132a669d2ed2e81d7bdf42.tar.gz frameworks_base-66af012f8b1e8adb18132a669d2ed2e81d7bdf42.tar.bz2 |
bootanimation: add multithreaded decode
Some devices can't keep up on a single thread trying
to decode & display the frames at a high frame rate. This is
observed if the sleep delay between frames is negative:
01-02 04:29:25.114 530 542 D BootAnimation: 63, -22
01-02 04:29:25.176 530 542 D BootAnimation: 61, -20
01-02 04:29:25.248 530 542 D BootAnimation: 72, -30
01-02 04:29:25.315 530 542 D BootAnimation: 66, -24
01-02 04:29:25.381 530 542 D BootAnimation: 66, -24
To mitigate this, take advantage of multiple cores by decoding on
n cores and caching up to m images. This keeps the memory footprint
small(ish) while still giving the best chance to maintain a
constant frame rate.
I measured boot time and fps for each animation part before
and after the change on an msm8909 with 1.5 GB RAM:
single thread:
01-02 04:40:45.826 540 556 I BootAnimation: fps = 22.40
01-02 04:40:49.457 540 556 I BootAnimation: fps = 13.22
01-02 04:40:51.464 540 556 I BootAnimation: fps = 23.92
01-02 04:41:19.375 540 556 I BootAnimation: fps = 22.89
01-02 04:41:23.942 540 556 I BootAnimation: fps = 15.55
boot time: 51.05s
multi thread:
01-02 04:38:55.148 526 551 I BootAnimation: fps = 22.56
01-02 04:38:57.205 526 551 I BootAnimation: fps = 23.39
01-02 04:38:59.249 526 551 I BootAnimation: fps = 23.92
01-02 04:39:29.196 526 551 I BootAnimation: fps = 23.16
01-02 04:39:32.186 526 551 I BootAnimation: fps = 23.79
boot time: 50.50s
Need to test the affect on boot time with an animation that doesn't
cache the textures as much as this to see the real effect.
Change-Id: If7464dc063b08a0bc33ee3f094028247b39650c1
Diffstat (limited to 'core/java')
0 files changed, 0 insertions, 0 deletions