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

Commit 934d46aa authored by Dileep Kumar Reddi's avatar Dileep Kumar Reddi Committed by Steve Kondik
Browse files

SF: Modify logic to handle "transparent Region" for displayFrame

sourceCrop and displayFrame calculations according to "transparent Region"
are not synchronized. Because of this mismatch scaling is introduced,
causing corruption in UI. To avoid this scaling, map displayFrame to
sourceCrop, apply reduce and remap result to displayFrame.

CRs-Fixed: 660699

Change-Id: I1e7ad5b1c8932413f53bb94a2e62895661b97057
parent 24165a2e
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -375,6 +375,22 @@ void Layer::setGeometry(
    // here we're guaranteed that the layer's transform preserves rects
    Rect frame(s.transform.transform(computeBounds()));
    frame.intersect(hw->getViewport(), &frame);

    //map frame(displayFrame) to sourceCrop
    frame = s.transform.inverse().transform(frame);

    // make sure sourceCrop with in the window's bounds
    frame.intersect(Rect(s.active.w, s.active.h), &frame);

    // subtract the transparent region and snap to the bounds
    frame = reduce(frame, s.activeTransparentRegion);

    //remap frame to displayFrame
    frame = s.transform.transform(frame);

    // make sure frame(displayFrame) with in viewframe
    frame.intersect(hw->getViewport(), &frame);

    const Transform& tr(hw->getTransform());
    layer.setFrame(tr.transform(frame));
#ifdef QCOM_BSP