commit | 9ad73bc2967d6d97d359cbad16996fcd7b83d30f | [log] [tgz] |
---|---|---|
author | Yiwei Zhang <zzyiwei@google.com> | Tue Aug 21 22:11:37 2018 -0700 |
committer | Yiwei Zhang <zzyiwei@google.com> | Wed Aug 22 00:20:28 2018 -0700 |
tree | 4358bc021ff8be03555a7ddd9d339c68e1774b6d | |
parent | 22f1e9cfb73cc53b0417d3a27b901cccb2b4b4bc [diff] [blame] |
Get screencap working correctly in landscape mode Bug: b/112869712 Test: adb shell screencap in all screen rotations Change-Id: I62b38775f8253bea85a1870ad63cd27715754656 Merged-In: I62b38775f8253bea85a1870ad63cd27715754656
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index f0c35d1..6ebff31 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -4833,8 +4833,8 @@ 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()); } }