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

Commit 536a95a0 authored by Michael Lentine's avatar Michael Lentine Committed by Android Git Automerger
Browse files

am 5a350596: Merge "Fix HWComposer Surface Crop when surface is rotated" into lmp-dev

* commit '5a350596':
  Fix HWComposer Surface Crop when surface is rotated
parents 86770280 5a350596
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -332,7 +332,7 @@ FloatRect Layer::computeCrop(const sp<const DisplayDevice>& hw) const {
            winHeight = s.active.w;
        }
        const Rect winCrop = activeCrop.transform(
                invTransform, s.active.w, s.active.h);
                invTransform, winWidth, winHeight);

        // below, crop is intersected with winCrop expressed in crop's coordinate space
        float xScale = crop.getWidth()  / float(winWidth);
@@ -340,8 +340,8 @@ FloatRect Layer::computeCrop(const sp<const DisplayDevice>& hw) const {

        float insetL = winCrop.left                  * xScale;
        float insetT = winCrop.top                   * yScale;
        float insetR = (winWidth  - winCrop.right ) * xScale;
        float insetB = (winHeight - winCrop.bottom) * yScale;
        float insetR = (s.active.w - winCrop.right ) * xScale;
        float insetB = (s.active.h - winCrop.bottom) * yScale;

        crop.left   += insetL;
        crop.top    += insetT;