• Dongseong Hwang's avatar
    Reland "viz: Turn off or crop primary plane when possible" · 1ceb0793
    Dongseong Hwang authored
    This is a reland of I7946d7acab334bffdf2bb49a1d9c424cf46fc610 and
    the following bug fixes as follows;
    "viz: Fix wrong uv_rect calculation" 4bf9d01d
    "viz: add unittests for CL:1291590" f8dfbe74
    
    Additional fix:
    - Fix the flickering issue because of primary |uv_rect| cropping even though
    an overlay attemption fails mainly due to limited pixel rate (e.g. 4k video).
    - Fix wrong |uv_rect| calculation which causes atomic page flip failures with
    "No space left on device (28)" error.
    
    Original change's description:
    > viz: Turn off or crop primary plane when possible
    >
    > For many fullscreen cases, the rest of the renderpass quads are solid
    > black quads. In that case, we can turn off the primary plane, and not
    > having to scan out an full screen of black pixels saves a good deal of
    > power. In other cases, we can crop down the primary plane down to the
    > content rectangle (youtube channel logo, for example) and save power.
    >
    > Averaging battery draw measurement over about a minute of play back
    > for a fullscreen youtube video, power savings for soraka is around
    > 500mW (6.5W to 6.0W) and 300mW for kevin (4.4W to 4.1W), when we
    > turn off the primary plane.
    >
    > Change-Id: I7946d7acab334bffdf2bb49a1d9c424cf46fc610
    > Reviewed-on: https://chromium-review.googlesource.com/c/1045256
    > Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
    > Reviewed-by: Dongseong Hwang <dongseong.hwang@intel.com>
    > Commit-Queue: Kristian H. Kristensen <hoegsberg@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#600415}
    
    TEST=SingleOverlayOnTopTest.AllowVideoNormalTransformWithOutputSurfaceOverlay
    
    Bug: 896945, 900373
    Change-Id: I88db118dbc3ca2fed8c8eaf1f9a4337cdae12990
    Reviewed-on: https://chromium-review.googlesource.com/c/1346997
    Commit-Queue: Dongseong Hwang <dongseong.hwang@intel.com>
    Reviewed-by: default avatarDongseong Hwang <dongseong.hwang@intel.com>
    Reviewed-by: default avatarKristian H. Kristensen <hoegsberg@chromium.org>
    Reviewed-by: default avatarDaniele Castagna <dcastagna@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#611484}
    1ceb0793
overlay_processor.h 4.43 KB