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

Commit 56d8b625 authored by Alec Mouri's avatar Alec Mouri Committed by android-build-merger
Browse files

Merge "[SurfaceFlinger] Fix screenshot orientation in landscape" into qt-dev

am: feb6af0e

Change-Id: I51692096bfc6020c2038c42eedb19439704a6483
parents 5c345757 feb6af0e
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -5613,6 +5613,11 @@ status_t SurfaceFlinger::captureScreen(uint64_t displayOrLayerStack, Dataspace*


        captureOrientation = fromSurfaceComposerRotation(
        captureOrientation = fromSurfaceComposerRotation(
                static_cast<ISurfaceComposer::Rotation>(display->getOrientation()));
                static_cast<ISurfaceComposer::Rotation>(display->getOrientation()));
        if (captureOrientation == ui::Transform::orientation_flags::ROT_90) {
            captureOrientation = ui::Transform::orientation_flags::ROT_270;
        } else if (captureOrientation == ui::Transform::orientation_flags::ROT_270) {
            captureOrientation = ui::Transform::orientation_flags::ROT_90;
        }
        *outDataspace =
        *outDataspace =
                pickDataspaceFromColorMode(display->getCompositionDisplay()->getState().colorMode);
                pickDataspaceFromColorMode(display->getCompositionDisplay()->getState().colorMode);
    }
    }