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

Commit 937542a5 authored by Winson Chung's avatar Winson Chung
Browse files

Add temporary bbq merge path to SCR logs

- Until we get some native-side logs, at least surface these to SCR so
  we don't lose them when trying to trace locally

Flag: EXEMPT dev logging
Bug: 349601805
Bug: 366484871
Test: adb shell setprop persist.wm.debug.sc.tx.log_match_call setAlpha,merge,apply
Change-Id: I9a3860f894f3649d1a7942a9cc43f6e693610a5a
parent ad216bac
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -4524,6 +4524,21 @@ public final class SurfaceControl implements Parcelable {
            return this;
        }

        /**
         * TODO(b/366484871): To be removed once we have some logging in native
         * This is called when BlastBufferQueue.mergeWithNextTransaction() is called from java, and
         * for the purposes of logging that path.
         */
        void onMergeWithNextTransaction(CharSequence windowName) {
            if (SurfaceControlRegistry.sCallStackDebuggingEnabled) {
                SurfaceControlRegistry.getProcessInstance().checkCallStackDebugging(
                        "merge", this, null, "window=" + windowName);
                if (mCalls != null) {
                    mCalls.clear();
                }
            }
        }

        /**
         * Equivalent to reparent with a null parent, in that it removes
         * the SurfaceControl from the scene, but it also releases
+4 −0
Original line number Diff line number Diff line
@@ -12402,6 +12402,7 @@ public final class ViewRootImpl implements ViewParent,
        transaction.setBlurRegions(surfaceControl, regionCopy);
        if (mBlastBufferQueue != null) {
            transaction.onMergeWithNextTransaction(getTitle());
            mBlastBufferQueue.mergeWithNextTransaction(transaction, frameNumber);
        }
    }
@@ -12428,6 +12429,9 @@ public final class ViewRootImpl implements ViewParent,
     */
    public void mergeWithNextTransaction(Transaction t, long frameNumber) {
        if (mBlastBufferQueue != null) {
            if (t != null) {
                t.onMergeWithNextTransaction(getTitle());
            }
            mBlastBufferQueue.mergeWithNextTransaction(t, frameNumber);
        } else {
            t.apply();