diff options
author | Vishnu Nair <vishnun@google.com> | 2019-05-23 16:27:45 +0800 |
---|---|---|
committer | Vishnu Nair <vishnun@google.com> | 2019-05-23 09:09:09 +0000 |
commit | 1ad69541a48e301c1582137e6f9f56a451f4b3c5 (patch) | |
tree | bf867d972d03cdd873c683cfbeefd817cdf18dfb | |
parent | 51374fc706c8d83f481a498bb582dea4be388058 (diff) | |
download | frameworks_base-1ad69541a48e301c1582137e6f9f56a451f4b3c5.tar.gz frameworks_base-1ad69541a48e301c1582137e6f9f56a451f4b3c5.tar.bz2 frameworks_base-1ad69541a48e301c1582137e6f9f56a451f4b3c5.zip |
Handle NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY flag in ASurfaceTransaction
BufferStateLayer ignores NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY flag if its set as part of
the transform.
Fix this by calling Transaction::setTransformToDisplayInverse when calling
ASurfaceTransaction_setGeometry.
Bug: 133330435
Test: Test landscape orientation in test app
Test: go/wm-smoke
Change-Id: Id499448d822425e5b7be4efed7f448c4e4378b87
-rw-r--r-- | native/android/surface_control.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/native/android/surface_control.cpp b/native/android/surface_control.cpp index 7ee2f0a1db1..8fe4fecceeb 100644 --- a/native/android/surface_control.cpp +++ b/native/android/surface_control.cpp @@ -384,6 +384,9 @@ void ASurfaceTransaction_setGeometry(ASurfaceTransaction* aSurfaceTransaction, transaction->setCrop(surfaceControl, static_cast<const Rect&>(source)); transaction->setFrame(surfaceControl, static_cast<const Rect&>(destination)); transaction->setTransform(surfaceControl, transform); + bool transformToInverseDisplay = (NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY & transform) == + NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY; + transaction->setTransformToDisplayInverse(surfaceControl, transformToInverseDisplay); } void ASurfaceTransaction_setBufferTransparency(ASurfaceTransaction* aSurfaceTransaction, |