diff options
author | chaviw <chaviw@google.com> | 2021-04-27 15:52:09 -0500 |
---|---|---|
committer | chaviw <chaviw@google.com> | 2021-04-27 16:47:45 -0500 |
commit | 9b2ac24f09d052ed160d520699386d82272e48a6 (patch) | |
tree | aabdaf7138ddbbfb37964027c8beb6896f9f0ff9 /native/android/surface_control.cpp | |
parent | 2e7c07e699ca1d7e41f0fb4dc69e43fd4aa2184d (diff) |
Added setBufferCrop to setGeometry
The crop being sent to SF is in layer space where the setGeometry API is
getting buffer space crop. This breaks the API behavior so call
setBufferCrop instead of setCrop
Test: ASurfaceControlTest
Fixes: 186266903
Change-Id: I8f2567aa41b9525c3c3dc08855d14d8a9b11c7e2
Diffstat (limited to 'native/android/surface_control.cpp')
-rw-r--r-- | native/android/surface_control.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/native/android/surface_control.cpp b/native/android/surface_control.cpp index 087837a5c70f..7540a143c2f3 100644 --- a/native/android/surface_control.cpp +++ b/native/android/surface_control.cpp @@ -449,7 +449,7 @@ void ASurfaceTransaction_setGeometry(ASurfaceTransaction* aSurfaceTransaction, sp<SurfaceControl> surfaceControl = ASurfaceControl_to_SurfaceControl(aSurfaceControl); Transaction* transaction = ASurfaceTransaction_to_Transaction(aSurfaceTransaction); - transaction->setCrop(surfaceControl, sourceRect); + transaction->setBufferCrop(surfaceControl, sourceRect); float dsdx = (destination.right - destination.left) / static_cast<float>(sourceRect.right - sourceRect.left); |