summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Winson Chung <winsonc@google.com> 2024-09-20 22:32:14 +0000
committer Winson Chung <winsonc@google.com> 2024-09-20 22:50:29 +0000
commit937542a5838a165a766b8fd8c1e048e7ec629b8e (patch)
treedab0f7e6cf13aa098f2cb27c5294540fa07e43d8
parentad216bac194362d56631dc8e20c8236996516b09 (diff)
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
-rw-r--r--core/java/android/view/SurfaceControl.java15
-rw-r--r--core/java/android/view/ViewRootImpl.java4
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 e10cc28d0745..194b0e373410 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -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();