Lower demuxer stream limits on low-end Android devices.
Currently demuxer stream limits are 12MiB for audio and 150MiB for video, regardless of the platform. This means that when playing long videos Chrome will slowly allocate up to 162MiB. Most low-end Android devices can't afford allocating that much, which translates to bad user experience: first device becomes sluggish, as OS tries hard to kill other processes / move memory to zram. Eventually (since renderer keeps allocating) Android gives up and kills Chrome. Turns out that Chromecast had similar issues and ended up lowering demuxer limits to 2MiB for audio / 30MiB for video. This CL turns demuxer limit constants into functions and selects lower values on low-end Android devices. Bug: 810906 Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Change-Id: I33fcd7d4916379abcb1f56cf9289928dfe3788a7 Reviewed-on: https://chromium-review.googlesource.com/922884Reviewed-by:Dale Curtis <dalecurtis@chromium.org> Commit-Queue: Dmitry Skiba <dskiba@chromium.org> Cr-Commit-Position: refs/heads/master@{#537853}
Showing
Please register or sign in to comment