diff --git a/apct-tests/perftests/windowmanager/src/android/wm/RelayoutPerfTest.java b/apct-tests/perftests/windowmanager/src/android/wm/RelayoutPerfTest.java index 4b8fae68e65ff..4ad015dcc4e5f 100644 --- a/apct-tests/perftests/windowmanager/src/android/wm/RelayoutPerfTest.java +++ b/apct-tests/perftests/windowmanager/src/android/wm/RelayoutPerfTest.java @@ -136,7 +136,6 @@ public class RelayoutPerfTest extends WindowManagerPerfTestBase final IntSupplier mViewVisibility; - int mFrameNumber; int mFlags; RelayoutRunner(Activity activity, IWindow window, IntSupplier visibilitySupplier) { @@ -153,7 +152,7 @@ public class RelayoutPerfTest extends WindowManagerPerfTestBase final IWindowSession session = WindowManagerGlobal.getWindowSession(); while (state.keepRunning()) { session.relayout(mWindow, mParams, mWidth, mHeight, - mViewVisibility.getAsInt(), mFlags, mFrameNumber, mOutFrames, + mViewVisibility.getAsInt(), mFlags, mOutFrames, mOutMergedConfiguration, mOutSurfaceControl, mOutInsetsState, mOutControls); } } diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java index 75aaebfabf8c6..f2a03558663e8 100644 --- a/core/java/android/service/wallpaper/WallpaperService.java +++ b/core/java/android/service/wallpaper/WallpaperService.java @@ -1142,7 +1142,7 @@ public abstract class WallpaperService extends Service { final int relayoutResult = mSession.relayout( mWindow, mLayout, mWidth, mHeight, - View.VISIBLE, 0, -1, mWinFrames, mMergedConfiguration, mSurfaceControl, + View.VISIBLE, 0, mWinFrames, mMergedConfiguration, mSurfaceControl, mInsetsState, mTempControls); final int transformHint = SurfaceControl.rotationToBufferTransform( diff --git a/core/java/android/view/IWindowSession.aidl b/core/java/android/view/IWindowSession.aidl index df0eb8955fd5c..a2cdc400b5bba 100644 --- a/core/java/android/view/IWindowSession.aidl +++ b/core/java/android/view/IWindowSession.aidl @@ -74,7 +74,6 @@ interface IWindowSession { * @param viewVisibility Window root view's visibility. * @param flags Request flags: {@link WindowManagerGlobal#RELAYOUT_INSETS_PENDING}, * {@link WindowManagerGlobal#RELAYOUT_DEFER_SURFACE_DESTROY}. - * @param frameNumber A frame number in which changes requested in this layout will be rendered. * @param outFrame Rect in which is placed the new position/size on * screen. * @param outContentInsets Rect in which is placed the offsets from @@ -103,7 +102,7 @@ interface IWindowSession { */ int relayout(IWindow window, in WindowManager.LayoutParams attrs, int requestedWidth, int requestedHeight, int viewVisibility, - int flags, long frameNumber, out ClientWindowFrames outFrames, + int flags, out ClientWindowFrames outFrames, out MergedConfiguration outMergedConfiguration, out SurfaceControl outSurfaceControl, out InsetsState insetsState, out InsetsSourceControl[] activeControls); diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 14f940dc51bbf..5ae30bb25a74e 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -7933,14 +7933,9 @@ public final class ViewRootImpl implements ViewParent, final int requestedWidth = (int) (mView.getMeasuredWidth() * appScale + 0.5f); final int requestedHeight = (int) (mView.getMeasuredHeight() * appScale + 0.5f); - long frameNumber = -1; - if (mSurface.isValid()) { - frameNumber = mSurface.getNextFrameNumber(); - } - int relayoutResult = mWindowSession.relayout(mWindow, params, requestedWidth, requestedHeight, viewVisibility, - insetsPending ? WindowManagerGlobal.RELAYOUT_INSETS_PENDING : 0, frameNumber, + insetsPending ? WindowManagerGlobal.RELAYOUT_INSETS_PENDING : 0, mTmpFrames, mPendingMergedConfiguration, mSurfaceControl, mTempInsets, mTempControls); diff --git a/core/java/android/view/WindowlessWindowManager.java b/core/java/android/view/WindowlessWindowManager.java index 5d6e2e94d792a..577546e39599d 100644 --- a/core/java/android/view/WindowlessWindowManager.java +++ b/core/java/android/view/WindowlessWindowManager.java @@ -263,7 +263,7 @@ public class WindowlessWindowManager implements IWindowSession { @Override public int relayout(IWindow window, WindowManager.LayoutParams inAttrs, - int requestedWidth, int requestedHeight, int viewFlags, int flags, long frameNumber, + int requestedWidth, int requestedHeight, int viewFlags, int flags, ClientWindowFrames outFrames, MergedConfiguration mergedConfiguration, SurfaceControl outSurfaceControl, InsetsState outInsetsState, InsetsSourceControl[] outActiveControls) { diff --git a/core/proto/android/server/windowmanagerservice.proto b/core/proto/android/server/windowmanagerservice.proto index 5b2f7f0a5c327..c33b7c9217407 100644 --- a/core/proto/android/server/windowmanagerservice.proto +++ b/core/proto/android/server/windowmanagerservice.proto @@ -439,7 +439,7 @@ message WindowStateProto { optional bool is_on_screen = 37; optional bool is_visible = 38; optional bool pending_seamless_rotation = 39; - optional int64 finished_seamless_rotation_frame = 40; + optional int64 finished_seamless_rotation_frame = 40 [deprecated=true]; optional WindowFramesProto window_frames = 41; optional bool force_seamless_rotation = 42; optional bool has_compat_scale = 43; diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/TaskSnapshotWindow.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/TaskSnapshotWindow.java index 2c6b3dbeb8a0b..1bef552e57caa 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/TaskSnapshotWindow.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/TaskSnapshotWindow.java @@ -241,7 +241,7 @@ public class TaskSnapshotWindow { window.setOuter(snapshotSurface); try { Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "TaskSnapshot#relayout"); - session.relayout(window, layoutParams, -1, -1, View.VISIBLE, 0, -1, + session.relayout(window, layoutParams, -1, -1, View.VISIBLE, 0, tmpFrames, tmpMergedConfiguration, surfaceControl, tmpInsetsState, tmpControls); Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER); diff --git a/services/core/java/com/android/server/wm/Session.java b/services/core/java/com/android/server/wm/Session.java index 05c5b1149418b..5276dc6a757ed 100644 --- a/services/core/java/com/android/server/wm/Session.java +++ b/services/core/java/com/android/server/wm/Session.java @@ -221,7 +221,7 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { @Override public int relayout(IWindow window, WindowManager.LayoutParams attrs, - int requestedWidth, int requestedHeight, int viewFlags, int flags, long frameNumber, + int requestedWidth, int requestedHeight, int viewFlags, int flags, ClientWindowFrames outFrames, MergedConfiguration mergedConfiguration, SurfaceControl outSurfaceControl, InsetsState outInsetsState, InsetsSourceControl[] outActiveControls) { @@ -229,7 +229,7 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { + Binder.getCallingPid()); Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, mRelayoutTag); int res = mService.relayoutWindow(this, window, attrs, - requestedWidth, requestedHeight, viewFlags, flags, frameNumber, + requestedWidth, requestedHeight, viewFlags, flags, outFrames, mergedConfiguration, outSurfaceControl, outInsetsState, outActiveControls); Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER); diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index 8d5d7ae37889f..7b6e4bdafdd6d 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -2180,7 +2180,7 @@ public class WindowManagerService extends IWindowManager.Stub public int relayoutWindow(Session session, IWindow client, LayoutParams attrs, int requestedWidth, int requestedHeight, int viewVisibility, int flags, - long frameNumber, ClientWindowFrames outFrames, MergedConfiguration mergedConfiguration, + ClientWindowFrames outFrames, MergedConfiguration mergedConfiguration, SurfaceControl outSurfaceControl, InsetsState outInsetsState, InsetsSourceControl[] outActiveControls) { Arrays.fill(outActiveControls, null); @@ -2202,8 +2202,6 @@ public class WindowManagerService extends IWindowManager.Stub win.setRequestedSize(requestedWidth, requestedHeight); } - win.setFrameNumber(frameNumber); - int attrChanges = 0; int flagChanges = 0; int privateFlagChanges = 0; diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index e45a76b27ebb0..690928c3b55ed 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -163,7 +163,6 @@ import static com.android.server.wm.WindowStateProto.ANIMATOR; import static com.android.server.wm.WindowStateProto.ATTRIBUTES; import static com.android.server.wm.WindowStateProto.DESTROYING; import static com.android.server.wm.WindowStateProto.DISPLAY_ID; -import static com.android.server.wm.WindowStateProto.FINISHED_SEAMLESS_ROTATION_FRAME; import static com.android.server.wm.WindowStateProto.FORCE_SEAMLESS_ROTATION; import static com.android.server.wm.WindowStateProto.GIVEN_CONTENT_INSETS; import static com.android.server.wm.WindowStateProto.GLOBAL_SCALE; @@ -380,7 +379,6 @@ class WindowState extends WindowContainer implements WindowManagerP */ final boolean mForceSeamlesslyRotate; SeamlessRotator mPendingSeamlessRotate; - long mFinishSeamlessRotateFrameNumber; private RemoteCallbackList mFocusCallbacks; @@ -706,11 +704,6 @@ class WindowState extends WindowContainer implements WindowManagerP */ private PowerManagerWrapper mPowerManagerWrapper; - /** - * A frame number in which changes requested in this layout will be rendered. - */ - private long mFrameNumber = -1; - private static final StringBuilder sTmpSB = new StringBuilder(); /** @@ -969,7 +962,6 @@ class WindowState extends WindowContainer implements WindowManagerP } mPendingSeamlessRotate.finish(t, this); - mFinishSeamlessRotateFrameNumber = getFrameNumber(); mPendingSeamlessRotate = null; getDisplayContent().getDisplayRotation().markForSeamlessRotation(this, @@ -4122,7 +4114,6 @@ class WindowState extends WindowContainer implements WindowManagerP proto.write(IS_ON_SCREEN, isOnScreen()); proto.write(IS_VISIBLE, isVisible); proto.write(PENDING_SEAMLESS_ROTATION, mPendingSeamlessRotate != null); - proto.write(FINISHED_SEAMLESS_ROTATION_FRAME, mFinishSeamlessRotateFrameNumber); proto.write(FORCE_SEAMLESS_ROTATION, mForceSeamlesslyRotate); proto.write(HAS_COMPAT_SCALE, hasCompatScale()); proto.write(GLOBAL_SCALE, mGlobalScale); @@ -4264,7 +4255,6 @@ class WindowState extends WindowContainer implements WindowManagerP } else { pw.print("null"); } - pw.println(" finishedFrameNumber=" + mFinishSeamlessRotateFrameNumber); if (mHScale != 1 || mVScale != 1) { pw.println(prefix + "mHScale=" + mHScale @@ -5633,16 +5623,6 @@ class WindowState extends WindowContainer implements WindowManagerP return target != null ? target.getWindow() : null; } - long getFrameNumber() { - // Return the frame number in which changes requested in this layout will be rendered or - // -1 if we do not expect the frame to be rendered. - return getFrame().isEmpty() ? -1 : mFrameNumber; - } - - void setFrameNumber(long frameNumber) { - mFrameNumber = frameNumber; - } - void forceReportingResized() { mWindowFrames.forceReportingResized(); }