diff options
-rw-r--r-- | core/java/android/view/SurfaceControl.java | 15 | ||||
-rw-r--r-- | core/java/android/view/ViewRootImpl.java | 4 |
2 files changed, 19 insertions, 0 deletions
diff --git a/core/java/android/view/SurfaceControl.java b/core/java/android/view/SurfaceControl.java index 2dda835436bc..90ceb440ea5e 100644 --- a/core/java/android/view/SurfaceControl.java +++ b/core/java/android/view/SurfaceControl.java @@ -4525,6 +4525,21 @@ public final class SurfaceControl implements Parcelable { } /** + * 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 * the local resources (by calling {@link SurfaceControl#release}) diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index daa0c57cf08e..66776ce04ad0 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -12391,6 +12391,7 @@ public final class ViewRootImpl implements ViewParent, transaction.setBlurRegions(surfaceControl, regionCopy); if (mBlastBufferQueue != null) { + transaction.onMergeWithNextTransaction(getTitle()); mBlastBufferQueue.mergeWithNextTransaction(transaction, frameNumber); } } @@ -12417,6 +12418,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(); |