浏览代码

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
ten
Vishnu Nair 2 年前
父节点
当前提交
1ad69541a4
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3
    0
      native/android/surface_control.cpp

+ 3
- 0
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,

正在加载...
取消
保存