diff options
author | Yiwei Zhang <zzyiwei@google.com> | 2018-08-21 22:11:37 -0700 |
---|---|---|
committer | Yiwei Zhang <zzyiwei@google.com> | 2018-08-22 00:20:28 -0700 |
commit | 9ad73bc2967d6d97d359cbad16996fcd7b83d30f (patch) | |
tree | 4358bc021ff8be03555a7ddd9d339c68e1774b6d | |
parent | 22f1e9cfb73cc53b0417d3a27b901cccb2b4b4bc (diff) | |
download | native-9ad73bc2967d6d97d359cbad16996fcd7b83d30f.tar.gz |
Get screencap working correctly in landscape mode
Bug: b/112869712
Test: adb shell screencap in all screen rotations
Change-Id: I62b38775f8253bea85a1870ad63cd27715754656
Merged-In: I62b38775f8253bea85a1870ad63cd27715754656
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index f0c35d163c..6ebff31a76 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -4833,8 +4833,8 @@ status_t SurfaceFlinger::captureScreen(const sp<IBinder>& display, sp<GraphicBuf sourceCrop.set(dispScissor); // adb shell screencap will default reqWidth and reqHeight to zeros. if (reqWidth == 0 || reqHeight == 0) { - reqWidth = uint32_t(dispScissor.width()); - reqHeight = uint32_t(dispScissor.height()); + reqWidth = uint32_t(device->getViewport().width()); + reqHeight = uint32_t(device->getViewport().height()); } } |