Skip to content
Snippets Groups Projects
Commit 749cadd1 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Fix no-op RelayoutPerfTest

The test has lost its functionality since [1].
Because the relayout invocation will be skipped if the
sequence number is old.

[1]: Ifb365789fa08103773fd3180e486ba1d92042fc5

Bug: 206872204
Test: atest RelayoutPerfTest
Change-Id: Ic8eb77a13a27a6c92279794cd7ed1981e1b03560
parent 4490339b
No related branches found
No related tags found
No related merge requests found
......@@ -128,6 +128,7 @@ public class RelayoutPerfTest extends WindowManagerPerfTestBase
final MergedConfiguration mOutMergedConfiguration = new MergedConfiguration();
final InsetsState mOutInsetsState = new InsetsState();
final InsetsSourceControl.Array mOutControls = new InsetsSourceControl.Array();
final Bundle mOutBundle = new Bundle();
final IWindow mWindow;
final View mView;
final WindowManager.LayoutParams mParams;
......@@ -136,7 +137,7 @@ public class RelayoutPerfTest extends WindowManagerPerfTestBase
final SurfaceControl mOutSurfaceControl;
final IntSupplier mViewVisibility;
int mRelayoutSeq;
int mFlags;
RelayoutRunner(Activity activity, IWindow window, IntSupplier visibilitySupplier) {
......@@ -152,10 +153,11 @@ public class RelayoutPerfTest extends WindowManagerPerfTestBase
void runBenchmark(BenchmarkState state) throws RemoteException {
final IWindowSession session = WindowManagerGlobal.getWindowSession();
while (state.keepRunning()) {
mRelayoutSeq++;
session.relayout(mWindow, mParams, mWidth, mHeight,
mViewVisibility.getAsInt(), mFlags, 0 /* seq */, 0 /* lastSyncSeqId */,
mViewVisibility.getAsInt(), mFlags, mRelayoutSeq, 0 /* lastSyncSeqId */,
mOutFrames, mOutMergedConfiguration, mOutSurfaceControl, mOutInsetsState,
mOutControls, new Bundle());
mOutControls, mOutBundle);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment