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

Commit 7e6e64c2 authored by Amin Shaikh's avatar Amin Shaikh
Browse files

Do not allocate a hardware layer for TileLayout.

This was a regression introduced by ag/3429142 which replaced the usage
of PagedTileLayout with TileLayout in QS.
PagedTileLayout#hasOverlappingRendering was overridden to return
false, but TileLayout did not have the same optimization. Since QSAnimator
animates the alpha of this layout, a hardware layer was allocated
unnecessarily, potentially causing jank in the QQS <-> QS animation.

Bug: 72632226
Test: visual and using "Debug GPU overdraw" and "Show hardware layers updates"
Change-Id: Idfa8eeac0b63ae03942cccd59b52657ab263427f
parent a13430af
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -104,6 +104,11 @@ public class TileLayout extends ViewGroup implements QSTileLayout {
        setMeasuredDimension(width, height);
    }

    @Override
    public boolean hasOverlappingRendering() {
        return false;
    }

    private static int exactly(int size) {
        return MeasureSpec.makeMeasureSpec(size, MeasureSpec.EXACTLY);
    }