Merge "Dump start and end transaction ids" into tm-qpr-dev am: f81f314c4c

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18799655

Change-Id: I52deb16ebcf306e5a0ee20125e193d56a0c48f2b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Pablo Gamito
2022-06-16 15:17:19 +00:00
committed by Automerger Merge Worker
3 changed files with 23 additions and 2 deletions

View File

@@ -58,6 +58,8 @@ message Transition {
State state = 5; State state = 5;
int32 flags = 6; int32 flags = 6;
repeated ChangeInfo change = 7; repeated ChangeInfo change = 7;
uint64 start_transaction_id = 8;
uint64 finish_transaction_id = 9;
} }
message ChangeInfo { message ChangeInfo {

View File

@@ -305,6 +305,16 @@ class Transition extends Binder implements BLASTSyncEngine.TransactionReadyListe
return mFlags; return mFlags;
} }
@VisibleForTesting
SurfaceControl.Transaction getStartTransaction() {
return mStartTransaction;
}
@VisibleForTesting
SurfaceControl.Transaction getFinishTransaction() {
return mFinishTransaction;
}
/** Starts collecting phase. Once this starts, all relevant surface operations are sync. */ /** Starts collecting phase. Once this starts, all relevant surface operations are sync. */
void startCollecting(long timeoutMs) { void startCollecting(long timeoutMs) {
if (mState != STATE_PENDING) { if (mState != STATE_PENDING) {
@@ -771,6 +781,8 @@ class Transition extends Binder implements BLASTSyncEngine.TransactionReadyListe
} }
mState = STATE_PLAYING; mState = STATE_PLAYING;
mStartTransaction = transaction;
mFinishTransaction = mController.mAtm.mWindowManager.mTransactionFactory.get();
mController.moveToPlaying(this); mController.moveToPlaying(this);
if (dc.isKeyguardLocked()) { if (dc.isKeyguardLocked()) {
@@ -856,8 +868,6 @@ class Transition extends Binder implements BLASTSyncEngine.TransactionReadyListe
if (controller != null && mTargets.contains(dc)) { if (controller != null && mTargets.contains(dc)) {
controller.setupStartTransaction(transaction); controller.setupStartTransaction(transaction);
} }
mStartTransaction = transaction;
mFinishTransaction = mController.mAtm.mWindowManager.mTransactionFactory.get();
buildFinishTransaction(mFinishTransaction, info.getRootLeash()); buildFinishTransaction(mFinishTransaction, info.getRootLeash());
if (mController.getTransitionPlayer() != null) { if (mController.getTransitionPlayer() != null) {
mController.dispatchLegacyAppTransitionStarting(info); mController.dispatchLegacyAppTransitionStarting(info);

View File

@@ -23,8 +23,10 @@ import static com.android.server.wm.shell.ChangeInfo.HAS_CHANGED;
import static com.android.server.wm.shell.ChangeInfo.TRANSIT_MODE; import static com.android.server.wm.shell.ChangeInfo.TRANSIT_MODE;
import static com.android.server.wm.shell.ChangeInfo.WINDOW_IDENTIFIER; import static com.android.server.wm.shell.ChangeInfo.WINDOW_IDENTIFIER;
import static com.android.server.wm.shell.Transition.CHANGE; import static com.android.server.wm.shell.Transition.CHANGE;
import static com.android.server.wm.shell.Transition.FINISH_TRANSACTION_ID;
import static com.android.server.wm.shell.Transition.FLAGS; import static com.android.server.wm.shell.Transition.FLAGS;
import static com.android.server.wm.shell.Transition.ID; import static com.android.server.wm.shell.Transition.ID;
import static com.android.server.wm.shell.Transition.START_TRANSACTION_ID;
import static com.android.server.wm.shell.Transition.STATE; import static com.android.server.wm.shell.Transition.STATE;
import static com.android.server.wm.shell.Transition.TIMESTAMP; import static com.android.server.wm.shell.Transition.TIMESTAMP;
import static com.android.server.wm.shell.Transition.TRANSITION_TYPE; import static com.android.server.wm.shell.Transition.TRANSITION_TYPE;
@@ -82,6 +84,13 @@ public class TransitionTracer {
outputStream.write(TRANSITION_TYPE, transition.mType); outputStream.write(TRANSITION_TYPE, transition.mType);
outputStream.write(STATE, transition.getState()); outputStream.write(STATE, transition.getState());
outputStream.write(FLAGS, transition.getFlags()); outputStream.write(FLAGS, transition.getFlags());
if (transition.getStartTransaction() != null) {
outputStream.write(START_TRANSACTION_ID, transition.getStartTransaction().getId());
}
if (transition.getFinishTransaction() != null) {
outputStream.write(FINISH_TRANSACTION_ID,
transition.getFinishTransaction().getId());
}
for (int i = 0; i < transition.mChanges.size(); ++i) { for (int i = 0; i < transition.mChanges.size(); ++i) {
final WindowContainer window = transition.mChanges.keyAt(i); final WindowContainer window = transition.mChanges.keyAt(i);