Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aecd4c49 authored by Arun Kumar K.R's avatar Arun Kumar K.R Committed by Arne Coucheron
Browse files

Surfaceflinger: Add Src orientation for the layer

hwcl->transform contains the final transform, add source transform
to it, so that the source transform can be used for setting correct
orientation for Secondary display.

Change-Id: I9dd6ab9495991b01211711f55b9380a3a53cf0f0
CRs-fixed: 341691, 330719, 342199, 344308
(cherry picked from commit ec2226ef4e8c9bbf5d255d26f9677d7e36fc6ea2)
parent 300bdcd3
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -44,7 +44,9 @@
#endif

#define DEBUG_RESIZE    0

#ifdef QCOM_HARDWARE
#define SHIFT_SRC_TRANSFORM 4
#endif

namespace android {

@@ -239,6 +241,12 @@ void Layer::setGeometry(hwc_layer_t* hwcl)
        hwcl->flags = HWC_SKIP_LAYER;
    } else {
        hwcl->transform = finalTransform;
#ifdef QCOM_HARDWARE
        //mBufferTransform will have the srcTransform
        //include src and final transform in the hwcl->transform
        hwcl->transform = (( bufferOrientation.getOrientation() <<
                                       SHIFT_SRC_TRANSFORM) | hwcl->transform);
#endif
    }

    if (isCropped()) {