summaryrefslogtreecommitdiff
path: root/libs/gui/SurfaceComposerClient.cpp
diff options
context:
space:
mode:
author Snild Dolkow <snild@sony.com> 2020-04-22 15:53:42 +0200
committer Lloyd Pique <lpique@google.com> 2020-05-06 13:34:50 -0700
commit9e217d60b645f32d499ef90b5164d650bc4976c4 (patch)
tree55e50d34b08ad5fc688d530efe2671efe9f6e11e /libs/gui/SurfaceComposerClient.cpp
parent547bea0331cd9d24e3931fefe4ea4fdfd6ddbbcf (diff)
CompositionEngine: base inverse transform on primary display
Layers with geomBufferUsesDisplayInverseTransform set (usually layers showing a camera preview) were not being rotated correctly on external displays with hardware composition. Forcing GPU composition avoided the issue, since BufferLayer.prepareClientLayer() uses the *primary* display's orientation to create the inverse transformation. But, the HWC path used each screen's orientation, resulting in a bad layer rotation when the primary and external displays' orientation differed. So let's do what the GPU path does. This, of course, only makes a difference when the primary and secondary display rotations differ. In our case, we noticed the problem when running the landscape-oriented CinemaPro app, while our default camera, which runs in portrait, did not have a problem. Co-authored-by: Mikael Magnusson <mikael.magnusson@sony.com> Note: This is an updated version of the change with the same Change-Id as uploaded to AOSP, as refactoring has continued, and more tests were added since. Bug: 155329360 Test: the new unit test fails without the patch Test: the new unit test passes with the patch Test: record using Cinema Pro app with an external screen Reference: I0da22423490a93fe943fd59e6c122aa6aaf30b11 Change-Id: I8b4975a14a0ae42d10e4eeaa66385e72ff00c23d
Diffstat (limited to 'libs/gui/SurfaceComposerClient.cpp')
0 files changed, 0 insertions, 0 deletions