Loading apct-tests/perftests/core/src/android/wm/RelayoutPerfTest.java +2 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentat import android.app.Activity; import android.content.Context; import android.graphics.Point; import android.graphics.Rect; import android.os.RemoteException; import android.perftests.utils.BenchmarkState; Loading Loading @@ -149,7 +150,7 @@ public class RelayoutPerfTest extends WindowManagerPerfTestBase { mViewVisibility.getAsInt(), mFlags, mFrameNumber, mOutFrame, mOutContentInsets, mOutVisibleInsets, mOutStableInsets, mOutBackDropFrame, mOutDisplayCutout, mOutMergedConfiguration, mOutSurfaceControl, mOutInsetsState); mOutSurfaceControl, mOutInsetsState, new Point()); } } } Loading core/java/android/service/wallpaper/WallpaperService.java +4 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.content.res.TypedArray; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.PixelFormat; import android.graphics.Point; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.hardware.display.DisplayManager; Loading Loading @@ -188,6 +189,7 @@ public abstract class WallpaperService extends Service { DisplayCutout mDispatchedDisplayCutout = DisplayCutout.NO_CUTOUT; final InsetsState mInsetsState = new InsetsState(); final MergedConfiguration mMergedConfiguration = new MergedConfiguration(); private final Point mSurfaceSize = new Point(); final WindowManager.LayoutParams mLayout = new WindowManager.LayoutParams(); Loading Loading @@ -838,12 +840,13 @@ public abstract class WallpaperService extends Service { } else { mLayout.surfaceInsets.set(0, 0, 0, 0); } final int relayoutResult = mSession.relayout( mWindow, mWindow.mSeq, mLayout, mWidth, mHeight, View.VISIBLE, 0, -1, mWinFrame, mContentInsets, mVisibleInsets, mStableInsets, mBackdropFrame, mDisplayCutout, mMergedConfiguration, mSurfaceControl, mInsetsState); mInsetsState, mSurfaceSize); if (mSurfaceControl.isValid()) { mSurfaceHolder.mSurface.copyFrom(mSurfaceControl); mSurfaceControl.release(); Loading core/java/android/view/IWindowSession.aidl +3 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.view; import android.content.ClipData; import android.graphics.Point; import android.graphics.Rect; import android.graphics.Region; import android.os.Bundle; Loading Loading @@ -90,6 +91,7 @@ interface IWindowSession { * since it was last displayed. * @param outSurface Object in which is placed the new display surface. * @param insetsState The current insets state in the system. * @param outSurfaceSize The width and height of the surface control * * @return int Result flags: {@link WindowManagerGlobal#RELAYOUT_SHOW_FOCUS}, * {@link WindowManagerGlobal#RELAYOUT_FIRST_TIME}. Loading @@ -101,7 +103,7 @@ interface IWindowSession { out Rect outBackdropFrame, out DisplayCutout.ParcelableWrapper displayCutout, out MergedConfiguration outMergedConfiguration, out SurfaceControl outSurfaceControl, out InsetsState insetsState); out InsetsState insetsState, out Point outSurfaceSize); /* * Notify the window manager that an application is relaunching and Loading core/java/android/view/ViewRootImpl.java +7 −4 Original line number Diff line number Diff line Loading @@ -436,6 +436,10 @@ public final class ViewRootImpl implements ViewParent, FallbackEventHandler mFallbackEventHandler; Choreographer mChoreographer; // used in relayout to get SurfaceControl size // for BLAST adapter surface setup private final Point mSurfaceSize = new Point(); final Rect mTempRect; // used in the transaction to not thrash the heap. final Rect mVisRect; // used to retrieve visible rect of focused view. private final Rect mTempBoundsRect = new Rect(); // used to set the size of the bounds surface. Loading Loading @@ -7333,14 +7337,13 @@ public final class ViewRootImpl implements ViewParent, insetsPending ? WindowManagerGlobal.RELAYOUT_INSETS_PENDING : 0, frameNumber, mTmpFrame, mPendingContentInsets, mPendingVisibleInsets, mPendingStableInsets, mPendingBackDropFrame, mPendingDisplayCutout, mPendingMergedConfiguration, mSurfaceControl, mTempInsets); mPendingMergedConfiguration, mSurfaceControl, mTempInsets, mSurfaceSize); if (mSurfaceControl.isValid()) { if (!WindowManagerGlobal.USE_BLAST_ADAPTER) { mSurface.copyFrom(mSurfaceControl); } else { mSurface.transferFrom(getOrCreateBLASTSurface( (int) (mView.getMeasuredWidth() * appScale + 0.5f), (int) (mView.getMeasuredHeight() * appScale + 0.5f))); mSurface.transferFrom(getOrCreateBLASTSurface(mSurfaceSize.x, mSurfaceSize.y)); } } else { destroySurface(); Loading core/java/android/view/WindowlessWindowManager.java +3 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.view; import android.content.res.Configuration; import android.graphics.PixelFormat; import android.graphics.Point; import android.graphics.Rect; import android.os.IBinder; import android.os.RemoteException; Loading Loading @@ -159,7 +160,8 @@ public class WindowlessWindowManager implements IWindowSession { Rect outFrame, Rect outContentInsets, Rect outVisibleInsets, Rect outStableInsets, Rect outBackdropFrame, DisplayCutout.ParcelableWrapper cutout, MergedConfiguration mergedConfiguration, SurfaceControl outSurfaceControl, InsetsState outInsetsState) { SurfaceControl outSurfaceControl, InsetsState outInsetsState, Point outSurfaceSize) { State state = null; synchronized (this) { state = mStateForWindow.get(window.asBinder()); Loading Loading
apct-tests/perftests/core/src/android/wm/RelayoutPerfTest.java +2 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentat import android.app.Activity; import android.content.Context; import android.graphics.Point; import android.graphics.Rect; import android.os.RemoteException; import android.perftests.utils.BenchmarkState; Loading Loading @@ -149,7 +150,7 @@ public class RelayoutPerfTest extends WindowManagerPerfTestBase { mViewVisibility.getAsInt(), mFlags, mFrameNumber, mOutFrame, mOutContentInsets, mOutVisibleInsets, mOutStableInsets, mOutBackDropFrame, mOutDisplayCutout, mOutMergedConfiguration, mOutSurfaceControl, mOutInsetsState); mOutSurfaceControl, mOutInsetsState, new Point()); } } } Loading
core/java/android/service/wallpaper/WallpaperService.java +4 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.content.res.TypedArray; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.PixelFormat; import android.graphics.Point; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.hardware.display.DisplayManager; Loading Loading @@ -188,6 +189,7 @@ public abstract class WallpaperService extends Service { DisplayCutout mDispatchedDisplayCutout = DisplayCutout.NO_CUTOUT; final InsetsState mInsetsState = new InsetsState(); final MergedConfiguration mMergedConfiguration = new MergedConfiguration(); private final Point mSurfaceSize = new Point(); final WindowManager.LayoutParams mLayout = new WindowManager.LayoutParams(); Loading Loading @@ -838,12 +840,13 @@ public abstract class WallpaperService extends Service { } else { mLayout.surfaceInsets.set(0, 0, 0, 0); } final int relayoutResult = mSession.relayout( mWindow, mWindow.mSeq, mLayout, mWidth, mHeight, View.VISIBLE, 0, -1, mWinFrame, mContentInsets, mVisibleInsets, mStableInsets, mBackdropFrame, mDisplayCutout, mMergedConfiguration, mSurfaceControl, mInsetsState); mInsetsState, mSurfaceSize); if (mSurfaceControl.isValid()) { mSurfaceHolder.mSurface.copyFrom(mSurfaceControl); mSurfaceControl.release(); Loading
core/java/android/view/IWindowSession.aidl +3 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.view; import android.content.ClipData; import android.graphics.Point; import android.graphics.Rect; import android.graphics.Region; import android.os.Bundle; Loading Loading @@ -90,6 +91,7 @@ interface IWindowSession { * since it was last displayed. * @param outSurface Object in which is placed the new display surface. * @param insetsState The current insets state in the system. * @param outSurfaceSize The width and height of the surface control * * @return int Result flags: {@link WindowManagerGlobal#RELAYOUT_SHOW_FOCUS}, * {@link WindowManagerGlobal#RELAYOUT_FIRST_TIME}. Loading @@ -101,7 +103,7 @@ interface IWindowSession { out Rect outBackdropFrame, out DisplayCutout.ParcelableWrapper displayCutout, out MergedConfiguration outMergedConfiguration, out SurfaceControl outSurfaceControl, out InsetsState insetsState); out InsetsState insetsState, out Point outSurfaceSize); /* * Notify the window manager that an application is relaunching and Loading
core/java/android/view/ViewRootImpl.java +7 −4 Original line number Diff line number Diff line Loading @@ -436,6 +436,10 @@ public final class ViewRootImpl implements ViewParent, FallbackEventHandler mFallbackEventHandler; Choreographer mChoreographer; // used in relayout to get SurfaceControl size // for BLAST adapter surface setup private final Point mSurfaceSize = new Point(); final Rect mTempRect; // used in the transaction to not thrash the heap. final Rect mVisRect; // used to retrieve visible rect of focused view. private final Rect mTempBoundsRect = new Rect(); // used to set the size of the bounds surface. Loading Loading @@ -7333,14 +7337,13 @@ public final class ViewRootImpl implements ViewParent, insetsPending ? WindowManagerGlobal.RELAYOUT_INSETS_PENDING : 0, frameNumber, mTmpFrame, mPendingContentInsets, mPendingVisibleInsets, mPendingStableInsets, mPendingBackDropFrame, mPendingDisplayCutout, mPendingMergedConfiguration, mSurfaceControl, mTempInsets); mPendingMergedConfiguration, mSurfaceControl, mTempInsets, mSurfaceSize); if (mSurfaceControl.isValid()) { if (!WindowManagerGlobal.USE_BLAST_ADAPTER) { mSurface.copyFrom(mSurfaceControl); } else { mSurface.transferFrom(getOrCreateBLASTSurface( (int) (mView.getMeasuredWidth() * appScale + 0.5f), (int) (mView.getMeasuredHeight() * appScale + 0.5f))); mSurface.transferFrom(getOrCreateBLASTSurface(mSurfaceSize.x, mSurfaceSize.y)); } } else { destroySurface(); Loading
core/java/android/view/WindowlessWindowManager.java +3 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.view; import android.content.res.Configuration; import android.graphics.PixelFormat; import android.graphics.Point; import android.graphics.Rect; import android.os.IBinder; import android.os.RemoteException; Loading Loading @@ -159,7 +160,8 @@ public class WindowlessWindowManager implements IWindowSession { Rect outFrame, Rect outContentInsets, Rect outVisibleInsets, Rect outStableInsets, Rect outBackdropFrame, DisplayCutout.ParcelableWrapper cutout, MergedConfiguration mergedConfiguration, SurfaceControl outSurfaceControl, InsetsState outInsetsState) { SurfaceControl outSurfaceControl, InsetsState outInsetsState, Point outSurfaceSize) { State state = null; synchronized (this) { state = mStateForWindow.get(window.asBinder()); Loading