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

Commit 75860753 authored by Mathias Agopian's avatar Mathias Agopian Committed by Android Git Automerger
Browse files

am b383438b: am a525483d: Merge "Fix a bug where non-cropped layer could be...

am b383438b: am a525483d: Merge "Fix a bug where non-cropped layer could be scaled incorrectly" into klp-dev

* commit 'b383438b':
  Fix a bug where non-cropped layer could be scaled incorrectly
parents 68df0589 b383438b
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -287,7 +287,13 @@ FloatRect Layer::computeCrop(const sp<const DisplayDevice>& hw) const {
    // pixels in the buffer.
    // FIXME: the 3 lines below can produce slightly incorrect clipping when we have
    // a viewport clipping and a window transform. we should use floating point to fix this.
    Rect activeCrop(s.transform.transform(s.active.crop));

    Rect activeCrop(s.active.w, s.active.h);
    if (!s.active.crop.isEmpty()) {
        activeCrop = s.active.crop;
    }

    activeCrop = s.transform.transform(activeCrop);
    activeCrop.intersect(hw->getViewport(), &activeCrop);
    activeCrop = s.transform.inverse().transform(activeCrop);