diff options
| -rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 60c6e4ecee..459cd0af89 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -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); } |