• Maggie Chen's avatar
    Optimize damage rect added from the previous overlay damage · 643c3e9a
    Maggie Chen authored
    This optimization reduces the damage rect size when the current damage rect
    doesn't cover the video quad. For example, the video is paused or no video
    change in this frame.
    
    Because the overlay image is missing in gl composition, there might be
    corruption if the old overlay needs to be redrawn in gl composition but the
    damage rect doesn't cover it. Although sometimes it's needed to add the
    overlay damage rect from the previous frame. It might increase the damage rect
    than necessary when overlay is the same.
    
    The unioned overlay quad size of the previous frame was always added to the
    damage rect of the next frame before calling the overlay processor. This CL
    optimizes the damage rect by handling the overlay damage rect in
    DCLayerOverlayProcessor().
    
    The other change of this CL is to move overlay and underlay validation code into
    one function. This makes it easier to read and makes sure there is no validation
    failures after the damage rect has changed.
    
    BUG=868561
    
    Change-Id: Ia66b950d5f010cb4b65288276cb9486e0d3d7709
    Reviewed-on: https://chromium-review.googlesource.com/c/1472190
    Commit-Queue: Maggie Chen <magchen@chromium.org>
    Reviewed-by: default avatarSunny Sachanandani <sunnyps@chromium.org>
    Reviewed-by: default avatarZhenyao Mo <zmo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#634952}
    643c3e9a
dc_layer_overlay.h 5.42 KB