• Bug 1594305 - Only allocate compositor surfaces for tiles that are no…

    …t occluded r=nical
    
    Tiles that are occluded are generally never seen, or only seen
    occasionally. To reduce the number of compositor surfaces:
    
     * Defer native surface allocation until after occlusion culling occurs.
     * If a tile has a native surface, then becomes occluded, drop the surface.
    
    With this scheme, the number of unused native surfaces will always be 0
    on a page that doesn't have scrolling. For a page that has a scrollable
    region, there will be a small number of unused tiles retained. The unused
    tiles are those that are (a) not occluded (b) not currently visible (c) are
    in the display port. We retain these for a small amount of time in case
    they get scrolled back on screen.
    
    This makes the allocation patterns for native surfaces match the way
    that picture cache surfaces are allocated for simple compositing mode.
    
    Differential Revision: https://phabricator.services.mozilla.com/D51973
    
    [wrupdater] From https://hg.mozilla.org/mozilla-central/rev/70442369cd48e37b05d2982f4109622cf8209bc6
    Glenn Watson authored and moz-gfx committed Nov 7, 2019