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

Commit 57e20651 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: I4166bbfdf23e37e5b77fccc80dd7d09698014a3c
parents b796a031 feb6af0e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -5665,6 +5665,11 @@ status_t SurfaceFlinger::captureScreen(uint64_t displayOrLayerStack, Dataspace*

        captureOrientation = fromSurfaceComposerRotation(
                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 =
                pickDataspaceFromColorMode(display->getCompositionDisplay()->getState().colorMode);
    }