Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8eafc8ac authored by Namit Solanki's avatar Namit Solanki Committed by Linux Build Service Account
Browse files

surfaceflinger: Flip the sourceCrop for inverse mounted panel.

- Flip the sourceCrop for inverse mounted panel when
screenshot is taken for WindowManagerService

Change-Id: I08bb7e0feea69dd15b372e9fbbd6984c6bfbec46
CRs-Fixed: 1033965
parent 63e663ae
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -3424,6 +3424,12 @@ void SurfaceFlinger::renderScreenImplLocked(
    if (DisplayDevice::DISPLAY_PRIMARY == hw->getDisplayType()) {
        rotation = (Transform::orientation_flags)
                (rotation ^ hw->getPanelMountFlip());
        if(hw->getPanelMountFlip() == Transform::orientation_flags::ROT_180)
        {
            sourceCrop.top = hw_h - sourceCrop.top;
            sourceCrop.bottom = hw_h - sourceCrop.bottom;
            yswap = false;
        }
    }

    // set-up our viewport