Loading core/java/android/view/SurfaceView.java +3 −4 Original line number Original line Diff line number Diff line Loading @@ -192,7 +192,6 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall boolean mDrawFinished = false; boolean mDrawFinished = false; final Rect mScreenRect = new Rect(); final Rect mScreenRect = new Rect(); private final SurfaceSession mSurfaceSession = new SurfaceSession(); private final boolean mLimitedHdrEnabled = Flags.limitedHdr(); private final boolean mLimitedHdrEnabled = Flags.limitedHdr(); SurfaceControl mSurfaceControl; SurfaceControl mSurfaceControl; Loading Loading @@ -1549,7 +1548,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall private void createBlastSurfaceControls(ViewRootImpl viewRoot, String name, private void createBlastSurfaceControls(ViewRootImpl viewRoot, String name, Transaction surfaceUpdateTransaction) { Transaction surfaceUpdateTransaction) { if (mSurfaceControl == null) { if (mSurfaceControl == null) { mSurfaceControl = new SurfaceControl.Builder(mSurfaceSession) mSurfaceControl = new SurfaceControl.Builder() .setName(name) .setName(name) .setLocalOwnerView(this) .setLocalOwnerView(this) .setParent(viewRoot.updateAndGetBoundsLayer(surfaceUpdateTransaction)) .setParent(viewRoot.updateAndGetBoundsLayer(surfaceUpdateTransaction)) Loading @@ -1559,7 +1558,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall } } if (mBlastSurfaceControl == null) { if (mBlastSurfaceControl == null) { mBlastSurfaceControl = new SurfaceControl.Builder(mSurfaceSession) mBlastSurfaceControl = new SurfaceControl.Builder() .setName(name + "(BLAST)") .setName(name + "(BLAST)") .setLocalOwnerView(this) .setLocalOwnerView(this) .setParent(mSurfaceControl) .setParent(mSurfaceControl) Loading @@ -1577,7 +1576,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall } } if (mBackgroundControl == null) { if (mBackgroundControl == null) { mBackgroundControl = new SurfaceControl.Builder(mSurfaceSession) mBackgroundControl = new SurfaceControl.Builder() .setName("Background for " + name) .setName("Background for " + name) .setLocalOwnerView(this) .setLocalOwnerView(this) .setOpaque(true) .setOpaque(true) Loading core/java/android/view/View.java +1 −3 Original line number Original line Diff line number Diff line Loading @@ -29217,8 +29217,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, + " shadowX=" + shadowTouchPoint.x + " shadowY=" + shadowTouchPoint.y); + " shadowX=" + shadowTouchPoint.x + " shadowY=" + shadowTouchPoint.y); } } final SurfaceSession session = new SurfaceSession(); final SurfaceControl surfaceControl = new SurfaceControl.Builder() final SurfaceControl surfaceControl = new SurfaceControl.Builder(session) .setName("drag surface") .setName("drag surface") .setParent(root.getSurfaceControl()) .setParent(root.getSurfaceControl()) .setBufferSize(shadowSize.x, shadowSize.y) .setBufferSize(shadowSize.x, shadowSize.y) Loading Loading @@ -29284,7 +29283,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, if (token == null) { if (token == null) { surface.destroy(); surface.destroy(); } } session.kill(); surfaceControl.release(); surfaceControl.release(); } } } } core/java/android/view/ViewRootImpl.java +1 −2 Original line number Original line Diff line number Diff line Loading @@ -841,7 +841,6 @@ public final class ViewRootImpl implements ViewParent, * surfaces can ensure they do not draw into the surface inset region set by the parent window. * surfaces can ensure they do not draw into the surface inset region set by the parent window. */ */ private SurfaceControl mBoundsLayer; private SurfaceControl mBoundsLayer; private final SurfaceSession mSurfaceSession = new SurfaceSession(); private final Transaction mTransaction = new Transaction(); private final Transaction mTransaction = new Transaction(); private final Transaction mFrameRateTransaction = new Transaction(); private final Transaction mFrameRateTransaction = new Transaction(); Loading Loading @@ -2712,7 +2711,7 @@ public final class ViewRootImpl implements ViewParent, */ */ public SurfaceControl updateAndGetBoundsLayer(Transaction t) { public SurfaceControl updateAndGetBoundsLayer(Transaction t) { if (mBoundsLayer == null) { if (mBoundsLayer == null) { mBoundsLayer = new SurfaceControl.Builder(mSurfaceSession) mBoundsLayer = new SurfaceControl.Builder() .setContainerLayer() .setContainerLayer() .setName("Bounds for - " + getTitle().toString()) .setName("Bounds for - " + getTitle().toString()) .setParent(getSurfaceControl()) .setParent(getSurfaceControl()) Loading core/java/android/view/WindowlessWindowManager.java +2 −3 Original line number Original line Diff line number Diff line Loading @@ -86,7 +86,6 @@ public class WindowlessWindowManager implements IWindowSession { final HashMap<IBinder, ResizeCompleteCallback> mResizeCompletionForWindow = final HashMap<IBinder, ResizeCompleteCallback> mResizeCompletionForWindow = new HashMap<IBinder, ResizeCompleteCallback>(); new HashMap<IBinder, ResizeCompleteCallback>(); private final SurfaceSession mSurfaceSession = new SurfaceSession(); protected final SurfaceControl mRootSurface; protected final SurfaceControl mRootSurface; private final Configuration mConfiguration; private final Configuration mConfiguration; private final IWindowSession mRealWm; private final IWindowSession mRealWm; Loading Loading @@ -184,13 +183,13 @@ public class WindowlessWindowManager implements IWindowSession { InputChannel outInputChannel, InsetsState outInsetsState, InputChannel outInputChannel, InsetsState outInsetsState, InsetsSourceControl.Array outActiveControls, Rect outAttachedFrame, InsetsSourceControl.Array outActiveControls, Rect outAttachedFrame, float[] outSizeCompatScale) { float[] outSizeCompatScale) { final SurfaceControl leash = new SurfaceControl.Builder(mSurfaceSession) final SurfaceControl leash = new SurfaceControl.Builder() .setName(attrs.getTitle().toString() + "Leash") .setName(attrs.getTitle().toString() + "Leash") .setCallsite("WindowlessWindowManager.addToDisplay") .setCallsite("WindowlessWindowManager.addToDisplay") .setParent(getParentSurface(window, attrs)) .setParent(getParentSurface(window, attrs)) .build(); .build(); final SurfaceControl sc = new SurfaceControl.Builder(mSurfaceSession) final SurfaceControl sc = new SurfaceControl.Builder() .setFormat(attrs.format) .setFormat(attrs.format) .setBLASTLayer() .setBLASTLayer() .setName(attrs.getTitle().toString()) .setName(attrs.getTitle().toString()) Loading Loading
core/java/android/view/SurfaceView.java +3 −4 Original line number Original line Diff line number Diff line Loading @@ -192,7 +192,6 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall boolean mDrawFinished = false; boolean mDrawFinished = false; final Rect mScreenRect = new Rect(); final Rect mScreenRect = new Rect(); private final SurfaceSession mSurfaceSession = new SurfaceSession(); private final boolean mLimitedHdrEnabled = Flags.limitedHdr(); private final boolean mLimitedHdrEnabled = Flags.limitedHdr(); SurfaceControl mSurfaceControl; SurfaceControl mSurfaceControl; Loading Loading @@ -1549,7 +1548,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall private void createBlastSurfaceControls(ViewRootImpl viewRoot, String name, private void createBlastSurfaceControls(ViewRootImpl viewRoot, String name, Transaction surfaceUpdateTransaction) { Transaction surfaceUpdateTransaction) { if (mSurfaceControl == null) { if (mSurfaceControl == null) { mSurfaceControl = new SurfaceControl.Builder(mSurfaceSession) mSurfaceControl = new SurfaceControl.Builder() .setName(name) .setName(name) .setLocalOwnerView(this) .setLocalOwnerView(this) .setParent(viewRoot.updateAndGetBoundsLayer(surfaceUpdateTransaction)) .setParent(viewRoot.updateAndGetBoundsLayer(surfaceUpdateTransaction)) Loading @@ -1559,7 +1558,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall } } if (mBlastSurfaceControl == null) { if (mBlastSurfaceControl == null) { mBlastSurfaceControl = new SurfaceControl.Builder(mSurfaceSession) mBlastSurfaceControl = new SurfaceControl.Builder() .setName(name + "(BLAST)") .setName(name + "(BLAST)") .setLocalOwnerView(this) .setLocalOwnerView(this) .setParent(mSurfaceControl) .setParent(mSurfaceControl) Loading @@ -1577,7 +1576,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall } } if (mBackgroundControl == null) { if (mBackgroundControl == null) { mBackgroundControl = new SurfaceControl.Builder(mSurfaceSession) mBackgroundControl = new SurfaceControl.Builder() .setName("Background for " + name) .setName("Background for " + name) .setLocalOwnerView(this) .setLocalOwnerView(this) .setOpaque(true) .setOpaque(true) Loading
core/java/android/view/View.java +1 −3 Original line number Original line Diff line number Diff line Loading @@ -29217,8 +29217,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, + " shadowX=" + shadowTouchPoint.x + " shadowY=" + shadowTouchPoint.y); + " shadowX=" + shadowTouchPoint.x + " shadowY=" + shadowTouchPoint.y); } } final SurfaceSession session = new SurfaceSession(); final SurfaceControl surfaceControl = new SurfaceControl.Builder() final SurfaceControl surfaceControl = new SurfaceControl.Builder(session) .setName("drag surface") .setName("drag surface") .setParent(root.getSurfaceControl()) .setParent(root.getSurfaceControl()) .setBufferSize(shadowSize.x, shadowSize.y) .setBufferSize(shadowSize.x, shadowSize.y) Loading Loading @@ -29284,7 +29283,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, if (token == null) { if (token == null) { surface.destroy(); surface.destroy(); } } session.kill(); surfaceControl.release(); surfaceControl.release(); } } } }
core/java/android/view/ViewRootImpl.java +1 −2 Original line number Original line Diff line number Diff line Loading @@ -841,7 +841,6 @@ public final class ViewRootImpl implements ViewParent, * surfaces can ensure they do not draw into the surface inset region set by the parent window. * surfaces can ensure they do not draw into the surface inset region set by the parent window. */ */ private SurfaceControl mBoundsLayer; private SurfaceControl mBoundsLayer; private final SurfaceSession mSurfaceSession = new SurfaceSession(); private final Transaction mTransaction = new Transaction(); private final Transaction mTransaction = new Transaction(); private final Transaction mFrameRateTransaction = new Transaction(); private final Transaction mFrameRateTransaction = new Transaction(); Loading Loading @@ -2712,7 +2711,7 @@ public final class ViewRootImpl implements ViewParent, */ */ public SurfaceControl updateAndGetBoundsLayer(Transaction t) { public SurfaceControl updateAndGetBoundsLayer(Transaction t) { if (mBoundsLayer == null) { if (mBoundsLayer == null) { mBoundsLayer = new SurfaceControl.Builder(mSurfaceSession) mBoundsLayer = new SurfaceControl.Builder() .setContainerLayer() .setContainerLayer() .setName("Bounds for - " + getTitle().toString()) .setName("Bounds for - " + getTitle().toString()) .setParent(getSurfaceControl()) .setParent(getSurfaceControl()) Loading
core/java/android/view/WindowlessWindowManager.java +2 −3 Original line number Original line Diff line number Diff line Loading @@ -86,7 +86,6 @@ public class WindowlessWindowManager implements IWindowSession { final HashMap<IBinder, ResizeCompleteCallback> mResizeCompletionForWindow = final HashMap<IBinder, ResizeCompleteCallback> mResizeCompletionForWindow = new HashMap<IBinder, ResizeCompleteCallback>(); new HashMap<IBinder, ResizeCompleteCallback>(); private final SurfaceSession mSurfaceSession = new SurfaceSession(); protected final SurfaceControl mRootSurface; protected final SurfaceControl mRootSurface; private final Configuration mConfiguration; private final Configuration mConfiguration; private final IWindowSession mRealWm; private final IWindowSession mRealWm; Loading Loading @@ -184,13 +183,13 @@ public class WindowlessWindowManager implements IWindowSession { InputChannel outInputChannel, InsetsState outInsetsState, InputChannel outInputChannel, InsetsState outInsetsState, InsetsSourceControl.Array outActiveControls, Rect outAttachedFrame, InsetsSourceControl.Array outActiveControls, Rect outAttachedFrame, float[] outSizeCompatScale) { float[] outSizeCompatScale) { final SurfaceControl leash = new SurfaceControl.Builder(mSurfaceSession) final SurfaceControl leash = new SurfaceControl.Builder() .setName(attrs.getTitle().toString() + "Leash") .setName(attrs.getTitle().toString() + "Leash") .setCallsite("WindowlessWindowManager.addToDisplay") .setCallsite("WindowlessWindowManager.addToDisplay") .setParent(getParentSurface(window, attrs)) .setParent(getParentSurface(window, attrs)) .build(); .build(); final SurfaceControl sc = new SurfaceControl.Builder(mSurfaceSession) final SurfaceControl sc = new SurfaceControl.Builder() .setFormat(attrs.format) .setFormat(attrs.format) .setBLASTLayer() .setBLASTLayer() .setName(attrs.getTitle().toString()) .setName(attrs.getTitle().toString()) Loading