• Peter McNeeley's avatar
    Minor improvement to overlay damage for opaque overlays · bc366664
    Peter McNeeley authored
    Due to existing limitations in damage calculations some overlay
    candidate quads will still lack a valid |surface_damage_index|. This
    means that separating out the damage of a promoted overlay quad from the
    damage on the primary plan is now virtually impossible. However, a
    simple optimization is still possible if the overlay candidate is opaque
    and sits above the primary plane (pure overlay not underlay). So in this
    case the |display_rect| of the promoted overlay can be subtracted from
    the primary plane damage.
    
    The motivation for these changes is primarily improved Lacros power
    performance. The special case mentioned above is far more common in
    existing lacros due to the entire lacros window being contained in one
    compositor frame.
    
    Finally, it should be noted that with this change some pages now move
    closer to power equivalence between Lacros and ash chrome. Specifically
    the Google Keeps drawing application has now only ~6% greater power
    usage on Lacros than ash chrome.
    
    
    
    Change-Id: I83af491adb3dd2832f599d34e5849fd518ffdfa5
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2634926Reviewed-by: default avatarRobert Kroeger <rjkroege@chromium.org>
    Commit-Queue: Peter McNeeley <petermcneeley@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#845294}
    bc366664
overlay_candidate.h 6.76 KB