• Bug 1627588 - Fix picture cache tiles being evicted too eagerly. r=nical

    The picture cache code retains a set of tiles that are currently
    off-screen but might be needed again soon, depending on how the
    page is scrolled.
    
    However, off-screen tiles were being skipped during draw processing,
    which meant that the texture cache request method was not being
    called on these tiles. This would often result in the texture
    cache eagerly evicting these seemingly unused surface tiles.
    
    This patch re-arranges the occlusion and visibility processing
    code for tiles, so that if a tile has been retained in the
    picture cache grid, the texture surface is always requested,
    even if that tile is currently off-screen. This prevents the
    texture cache from evicting tiles that we want to retain for now.
    
    Differential Revision: https://phabricator.services.mozilla.com/D69760
    
    [ghsync] From https://hg.mozilla.org/mozilla-central/rev/c39512f89aedf7c0745137da9c8c09a54f9ab2e8
    gw3583 authored and moz-gfx committed Apr 7, 2020