• danakj's avatar
    Don't purge busy resources from ResourcePool · 2477ec97
    danakj authored
    But drop them when they become available if we're in the SUSPENDED
    memory state.
    
    Deleting busy resorces doesn't actually free any memory, it just moves
    the ownership solely into the ResourceProvider until they become
    available. Instead, we can keep them in the busy list, and when
    they are available, decide to keep them or not based on the
    memory state instead.
    
    This should also improve things by reducing memory footprint in the
    SUSPENDED memory state if OnPurgeMemory() isn't being called but
    new tile resources are being made and released.
    
    R=ericrk@chromium.org, vmpstr@chromium.org
    
    Bug: 730660
    Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
    Change-Id: I24e1a6f38c88fa278566849174a315bff71ed375
    Reviewed-on: https://chromium-review.googlesource.com/886862
    Commit-Queue: danakj <danakj@chromium.org>
    Reviewed-by: default avatarvmpstr <vmpstr@chromium.org>
    Reviewed-by: default avatarEric Karl <ericrk@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#532492}
    2477ec97
resource_pool_unittest.cc 22.4 KB