Loading core/java/android/view/SurfaceView.java +5 −5 Original line number Diff line number Diff line Loading @@ -379,7 +379,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall * This gets called on a RenderThread worker thread, so members accessed here must * be protected by a lock. */ final boolean useBLAST = ViewRootImpl.USE_BLAST_BUFFERQUEUE; final boolean useBLAST = WindowManagerGlobal.USE_BLAST_ADAPTER; viewRoot.registerRtFrameCallback(frame -> { try { final SurfaceControl.Transaction t = useBLAST ? Loading Loading @@ -1107,7 +1107,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall private void applySurfaceTransforms(SurfaceControl surface, SurfaceControl.Transaction t, Rect position, long frameNumber) { if (frameNumber > 0 && ViewRootImpl.USE_BLAST_BUFFERQUEUE == false) { if (frameNumber > 0 && !WindowManagerGlobal.USE_BLAST_ADAPTER) { final ViewRootImpl viewRoot = getViewRootImpl(); t.deferTransactionUntilSurface(surface, viewRoot.mSurface, Loading @@ -1125,7 +1125,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall } private void setParentSpaceRectangle(Rect position, long frameNumber) { final boolean useBLAST = ViewRootImpl.USE_BLAST_BUFFERQUEUE; final boolean useBLAST = WindowManagerGlobal.USE_BLAST_ADAPTER; final ViewRootImpl viewRoot = getViewRootImpl(); final SurfaceControl.Transaction t = useBLAST ? viewRoot.getBLASTSyncTransaction() : mRtTransaction; Loading Loading @@ -1186,7 +1186,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall @Override public void positionLost(long frameNumber) { boolean useBLAST = ViewRootImpl.USE_BLAST_BUFFERQUEUE; boolean useBLAST = WindowManagerGlobal.USE_BLAST_ADAPTER; if (DEBUG) { Log.d(TAG, String.format("%d windowPositionLost, frameNr = %d", System.identityHashCode(this), frameNumber)); Loading Loading @@ -1524,7 +1524,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall @Override public void invalidate(boolean invalidateCache) { super.invalidate(invalidateCache); if (ViewRootImpl.USE_BLAST_BUFFERQUEUE == false) { if (!WindowManagerGlobal.USE_BLAST_ADAPTER) { return; } final ViewRootImpl viewRoot = getViewRootImpl(); Loading core/java/android/view/ViewRootImpl.java +2 −7 Original line number Diff line number Diff line Loading @@ -191,11 +191,6 @@ public final class ViewRootImpl implements ViewParent, */ private static final boolean MT_RENDERER_AVAILABLE = true; /** * @hide */ public static final boolean USE_BLAST_BUFFERQUEUE = false; /** * If set to 2, the view system will switch from using rectangles retrieved from window to * dispatch to the view hierarchy to using {@link InsetsController}, that derives the insets Loading Loading @@ -1312,7 +1307,7 @@ public final class ViewRootImpl implements ViewParent, } mWindowAttributes.privateFlags |= compatibleWindowFlag; if (USE_BLAST_BUFFERQUEUE) { if (WindowManagerGlobal.USE_BLAST_ADAPTER) { mWindowAttributes.privateFlags = WindowManager.LayoutParams.PRIVATE_FLAG_USE_BLAST; } Loading Loading @@ -7273,7 +7268,7 @@ public final class ViewRootImpl implements ViewParent, mPendingStableInsets, mPendingBackDropFrame, mPendingDisplayCutout, mPendingMergedConfiguration, mSurfaceControl, mTempInsets); if (mSurfaceControl.isValid()) { if (USE_BLAST_BUFFERQUEUE == false) { if (!WindowManagerGlobal.USE_BLAST_ADAPTER) { mSurface.copyFrom(mSurfaceControl); } else { mSurface.transferFrom(getOrCreateBLASTSurface( Loading core/java/android/view/WindowManagerGlobal.java +6 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,12 @@ import java.util.ArrayList; public final class WindowManagerGlobal { private static final String TAG = "WindowManager"; /** * This flag controls whether ViewRootImpl will utilize the Blast Adapter * to send buffer updates to SurfaceFlinger */ public static final boolean USE_BLAST_ADAPTER = false; /** * The user is navigating with keys (not the touch screen), so * navigational focus should be shown. Loading Loading
core/java/android/view/SurfaceView.java +5 −5 Original line number Diff line number Diff line Loading @@ -379,7 +379,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall * This gets called on a RenderThread worker thread, so members accessed here must * be protected by a lock. */ final boolean useBLAST = ViewRootImpl.USE_BLAST_BUFFERQUEUE; final boolean useBLAST = WindowManagerGlobal.USE_BLAST_ADAPTER; viewRoot.registerRtFrameCallback(frame -> { try { final SurfaceControl.Transaction t = useBLAST ? Loading Loading @@ -1107,7 +1107,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall private void applySurfaceTransforms(SurfaceControl surface, SurfaceControl.Transaction t, Rect position, long frameNumber) { if (frameNumber > 0 && ViewRootImpl.USE_BLAST_BUFFERQUEUE == false) { if (frameNumber > 0 && !WindowManagerGlobal.USE_BLAST_ADAPTER) { final ViewRootImpl viewRoot = getViewRootImpl(); t.deferTransactionUntilSurface(surface, viewRoot.mSurface, Loading @@ -1125,7 +1125,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall } private void setParentSpaceRectangle(Rect position, long frameNumber) { final boolean useBLAST = ViewRootImpl.USE_BLAST_BUFFERQUEUE; final boolean useBLAST = WindowManagerGlobal.USE_BLAST_ADAPTER; final ViewRootImpl viewRoot = getViewRootImpl(); final SurfaceControl.Transaction t = useBLAST ? viewRoot.getBLASTSyncTransaction() : mRtTransaction; Loading Loading @@ -1186,7 +1186,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall @Override public void positionLost(long frameNumber) { boolean useBLAST = ViewRootImpl.USE_BLAST_BUFFERQUEUE; boolean useBLAST = WindowManagerGlobal.USE_BLAST_ADAPTER; if (DEBUG) { Log.d(TAG, String.format("%d windowPositionLost, frameNr = %d", System.identityHashCode(this), frameNumber)); Loading Loading @@ -1524,7 +1524,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall @Override public void invalidate(boolean invalidateCache) { super.invalidate(invalidateCache); if (ViewRootImpl.USE_BLAST_BUFFERQUEUE == false) { if (!WindowManagerGlobal.USE_BLAST_ADAPTER) { return; } final ViewRootImpl viewRoot = getViewRootImpl(); Loading
core/java/android/view/ViewRootImpl.java +2 −7 Original line number Diff line number Diff line Loading @@ -191,11 +191,6 @@ public final class ViewRootImpl implements ViewParent, */ private static final boolean MT_RENDERER_AVAILABLE = true; /** * @hide */ public static final boolean USE_BLAST_BUFFERQUEUE = false; /** * If set to 2, the view system will switch from using rectangles retrieved from window to * dispatch to the view hierarchy to using {@link InsetsController}, that derives the insets Loading Loading @@ -1312,7 +1307,7 @@ public final class ViewRootImpl implements ViewParent, } mWindowAttributes.privateFlags |= compatibleWindowFlag; if (USE_BLAST_BUFFERQUEUE) { if (WindowManagerGlobal.USE_BLAST_ADAPTER) { mWindowAttributes.privateFlags = WindowManager.LayoutParams.PRIVATE_FLAG_USE_BLAST; } Loading Loading @@ -7273,7 +7268,7 @@ public final class ViewRootImpl implements ViewParent, mPendingStableInsets, mPendingBackDropFrame, mPendingDisplayCutout, mPendingMergedConfiguration, mSurfaceControl, mTempInsets); if (mSurfaceControl.isValid()) { if (USE_BLAST_BUFFERQUEUE == false) { if (!WindowManagerGlobal.USE_BLAST_ADAPTER) { mSurface.copyFrom(mSurfaceControl); } else { mSurface.transferFrom(getOrCreateBLASTSurface( Loading
core/java/android/view/WindowManagerGlobal.java +6 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,12 @@ import java.util.ArrayList; public final class WindowManagerGlobal { private static final String TAG = "WindowManager"; /** * This flag controls whether ViewRootImpl will utilize the Blast Adapter * to send buffer updates to SurfaceFlinger */ public static final boolean USE_BLAST_ADAPTER = false; /** * The user is navigating with keys (not the touch screen), so * navigational focus should be shown. Loading