[go: nahoru, domu]

gpu: Drop GrContext cache when application is backgrounded.

This matches the behaviour in the renderer which drops the cache once
all compositors are invisible. Since we have a shared context across all
renderers now, per-renderer visibility doesn't make apply anymore. So we
do this when the application is backgrounded.

Also this only does it for Android which plumbs background/foreground
notifications to the GPU. We need these notifications plumbed for
desktop too.

R=ericrk@chromium.org

Bug: 859419
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: Ife08e37bc77e5fcf81ce5a79361b74c34ff9b7bb
Reviewed-on: https://chromium-review.googlesource.com/1123366
Commit-Queue: Khushal <khushalsagar@chromium.org>
Reviewed-by: Eric Karl <ericrk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573629}
7 files changed