• danakj's avatar
    cc: Mirror LiveTilesRect and tiles between active and recycled trees. · bd6d7bc4
    danakj authored
    When the live tiles rect changes on the active tiling, we also remove
    tiles on the recycled tiling to avoid unshared tiles in the recycle
    tree. But when a tile is created on the active tree, we should also
    share the tile to the recycle tree. Since we're creating tiles, we
    also need to update the live tiles rect so tiles do not exist outside
    of it. So now the live tiles rect is simply updated on both trees at
    once.
    
    This ensures that on the next commit, if the picture layer did not
    get any invalidations, and doesn't push properties, it still has all
    the tiles in its live tiles rect so we can do ready-to-activate checks
    correctly.
    
    Secondly, when activating, if any tiles were present on the pending
    tree but are not on the active tree (can happen due to missing
    recordings on the active tree), then share those tiles to the active
    tree during activation.
    
    This patch fixes DCHECKs occuring in PictureLayerTiling's
    CloneTilesAndPropertiesFrom() where the pending and active tiling were
    not ending up with the same number of tiles.
    
    R=enne, vmpstr
    BUG=387116
    
    Review URL: https://codereview.chromium.org/799463005
    
    Cr-Commit-Position: refs/heads/master@{#308174}
    bd6d7bc4
picture_layer_impl.cc 50.2 KB