• Bug 1624565 - Avoid clearing the texture cache as often. r=gw

    The current heuristic in TextureCache::maybe_reclaim_shared_memory pretty much clears the cache every 5 seconds. Clearing the cache is prtty drastic though, because it causes us to re-upload data and reallocate several textures on the next frame. We really only want to do it when the savings are big, which happens less often now that texture array layer count is capped at 16 and that textures are released as soon as they are empty.
    
    This makes us clear the cache less often by augmenting the threshold to 16 megabytes and only considering texture regions that would not be reallocated right away (since we grow some texture arrays more than one region at a time).
    
    Differential Revision: https://phabricator.services.mozilla.com/D68051
    
    [ghsync] From https://hg.mozilla.org/mozilla-central/rev/61582f6d817a401e12c32340873d3d781e6cfaf2
    nical authored and moz-gfx committed Mar 25, 2020