diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2019-06-24 19:22:17 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-06-24 19:22:17 +0000 |
commit | feb6af0eaf391e16c95bf45273f2d37bebdadc43 (patch) | |
tree | d82ce4a49c893dd71bfc3041640264f2975d876a | |
parent | 5e3645666e00d21144865177e6e8b3b740b4a4f7 (diff) | |
parent | 21fab7521e3d908987f2affe480d4d1a71d61f4d (diff) | |
download | native-feb6af0eaf391e16c95bf45273f2d37bebdadc43.tar.gz |
Merge "[SurfaceFlinger] Fix screenshot orientation in landscape" into qt-dev
-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 2579225675..2d319101b3 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -5613,6 +5613,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); } |