OSDN Git Service

surfaceflinger: respect install orientation in DisplayRenderArea
authorChia-I Wu <olv@google.com>
Mon, 27 Aug 2018 21:54:37 +0000 (14:54 -0700)
committerYiwei Zhang <zzyiwei@google.com>
Thu, 21 Mar 2019 04:36:53 +0000 (04:36 +0000)
commitbecab0f31aa76f57fdbd87913f027daa07054cf9
tree0d09a0d8ff2958ed8fbc3b9c0457338298280099
parent690a76f15c4f267076ba8a70aff0c120e996a115
surfaceflinger: respect install orientation in DisplayRenderArea

DisplayRenderArea getTransform takes install orientation into
consideration.  Fix getSourceCrop and getRotationFlags to respect
install orientation as well.

This results in some changes

 - source crop is no longer rotated by install orientation for
   LayerRenderArea
 - rotation flags is no longer rotated by install orientation for
   LayerRenderArea
 - source crop is no longer set to getBounds by default for
   LayerRenderArea (it is already done in captureLayers)
 - source crop is always rotated by install orientation for
   DisplayRenderArea

AFAICT, all the changes are actually fixes.  Quickly verified by
forcing primaryDisplayOrientation to DisplayState::eOrientation90.

Bug: 113041375
Test: take screenshot, rotate screen, screencap
Change-Id: If19df222ae52f6b276f9b0572e7b9bec872e3ae4
Merged-In: If19df222ae52f6b276f9b0572e7b9bec872e3ae4
services/surfaceflinger/DisplayDevice.h
services/surfaceflinger/SurfaceFlinger.cpp