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

Commit 90c0aba8 authored by Alec Mouri's avatar Alec Mouri
Browse files

Don't always send hdr headroom in SurfaceView

Otherwise SurfaceView joins no-op txns with VRI's, which generates false
positives for jank SurfaceView is submitting new transactions that were now late. Instead, just don't submit transactions if we're not changing the headroom.

Bug: 332003860
Test: ShowMultipleBubblesAndSwitchMicrobenchmark#testShowMultipleBubblesAndSwitch
Change-Id: Icf479c3c814493cc89ac44ef8192cd14f156be97
parent 202ac2fe
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -951,7 +951,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall

    private boolean performSurfaceTransaction(ViewRootImpl viewRoot, Translator translator,
            boolean creating, boolean sizeChanged, boolean hintChanged, boolean relativeZChanged,
            Transaction surfaceUpdateTransaction) {
            boolean hdrHeadroomChanged, Transaction surfaceUpdateTransaction) {
        boolean realSizeChanged = false;

        mSurfaceLock.lock();
@@ -986,7 +986,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall

            updateBackgroundVisibility(surfaceUpdateTransaction);
            updateBackgroundColor(surfaceUpdateTransaction);
            if (mLimitedHdrEnabled) {
            if (mLimitedHdrEnabled && hdrHeadroomChanged) {
                surfaceUpdateTransaction.setDesiredHdrHeadroom(
                        mBlastSurfaceControl, mHdrHeadroom);
            }
@@ -1203,7 +1203,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
                }

                final boolean realSizeChanged = performSurfaceTransaction(viewRoot, translator,
                        creating, sizeChanged, hintChanged, relativeZChanged,
                        creating, sizeChanged, hintChanged, relativeZChanged, hdrHeadroomChanged,
                        surfaceUpdateTransaction);

                try {