Loading core/java/android/view/SurfaceView.java +5 −5 Original line number Diff line number Diff line Loading @@ -385,7 +385,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 = WindowManagerGlobal.getInstance().useBLAST(); final boolean useBLAST = WindowManagerGlobal.useBLAST(); viewRoot.registerRtFrameCallback(frame -> { try { final SurfaceControl.Transaction t = useBLAST ? Loading Loading @@ -1119,7 +1119,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall private void applySurfaceTransforms(SurfaceControl surface, SurfaceControl.Transaction t, Rect position, long frameNumber) { if (frameNumber > 0 && !WindowManagerGlobal.getInstance().useBLAST()) { if (frameNumber > 0 && !WindowManagerGlobal.useBLAST()) { final ViewRootImpl viewRoot = getViewRootImpl(); t.deferTransactionUntil(surface, viewRoot.getRenderSurfaceControl(), Loading @@ -1137,7 +1137,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall } private void setParentSpaceRectangle(Rect position, long frameNumber) { final boolean useBLAST = WindowManagerGlobal.getInstance().useBLAST(); final boolean useBLAST = WindowManagerGlobal.useBLAST(); final ViewRootImpl viewRoot = getViewRootImpl(); final SurfaceControl.Transaction t = useBLAST ? viewRoot.getBLASTSyncTransaction() : mRtTransaction; Loading Loading @@ -1198,7 +1198,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall @Override public void positionLost(long frameNumber) { boolean useBLAST = WindowManagerGlobal.getInstance().useBLAST(); boolean useBLAST = WindowManagerGlobal.useBLAST(); if (DEBUG) { Log.d(TAG, String.format("%d windowPositionLost, frameNr = %d", System.identityHashCode(this), frameNumber)); Loading Loading @@ -1537,7 +1537,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall @Override public void invalidate(boolean invalidateCache) { super.invalidate(invalidateCache); if (!WindowManagerGlobal.getInstance().useBLAST()) { if (!WindowManagerGlobal.useBLAST()) { return; } final ViewRootImpl viewRoot = getViewRootImpl(); Loading core/java/android/view/ViewRootImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -742,7 +742,7 @@ public final class ViewRootImpl implements ViewParent, loadSystemProperties(); mImeFocusController = new ImeFocusController(this); mUseBLASTAdapter = WindowManagerGlobal.getInstance().useBLAST(); mUseBLASTAdapter = WindowManagerGlobal.useBLAST(); } public static void addFirstDrawHandler(Runnable callback) { Loading core/java/android/view/WindowManagerGlobal.java +4 −8 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ import java.util.ArrayList; public final class WindowManagerGlobal { private static final String TAG = "WindowManager"; private final boolean mUseBLASTAdapter; private static boolean sUseBLASTAdapter = false; /** * The user is navigating with keys (not the touch screen), so Loading Loading @@ -159,11 +159,6 @@ public final class WindowManagerGlobal { private Runnable mSystemPropertyUpdater; private WindowManagerGlobal() { try { mUseBLASTAdapter = getWindowManagerService().useBLAST(); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } @UnsupportedAppUsage Loading Loading @@ -191,6 +186,7 @@ public final class WindowManagerGlobal { if (sWindowManagerService != null) { ValueAnimator.setDurationScale( sWindowManagerService.getCurrentAnimatorScale()); sUseBLASTAdapter = sWindowManagerService.useBLAST(); } } catch (RemoteException e) { throw e.rethrowFromSystemServer(); Loading Loading @@ -235,8 +231,8 @@ public final class WindowManagerGlobal { /** * Whether or not to use BLAST for ViewRootImpl */ public boolean useBLAST() { return mUseBLASTAdapter; public static boolean useBLAST() { return sUseBLASTAdapter; } @UnsupportedAppUsage Loading Loading
core/java/android/view/SurfaceView.java +5 −5 Original line number Diff line number Diff line Loading @@ -385,7 +385,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 = WindowManagerGlobal.getInstance().useBLAST(); final boolean useBLAST = WindowManagerGlobal.useBLAST(); viewRoot.registerRtFrameCallback(frame -> { try { final SurfaceControl.Transaction t = useBLAST ? Loading Loading @@ -1119,7 +1119,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall private void applySurfaceTransforms(SurfaceControl surface, SurfaceControl.Transaction t, Rect position, long frameNumber) { if (frameNumber > 0 && !WindowManagerGlobal.getInstance().useBLAST()) { if (frameNumber > 0 && !WindowManagerGlobal.useBLAST()) { final ViewRootImpl viewRoot = getViewRootImpl(); t.deferTransactionUntil(surface, viewRoot.getRenderSurfaceControl(), Loading @@ -1137,7 +1137,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall } private void setParentSpaceRectangle(Rect position, long frameNumber) { final boolean useBLAST = WindowManagerGlobal.getInstance().useBLAST(); final boolean useBLAST = WindowManagerGlobal.useBLAST(); final ViewRootImpl viewRoot = getViewRootImpl(); final SurfaceControl.Transaction t = useBLAST ? viewRoot.getBLASTSyncTransaction() : mRtTransaction; Loading Loading @@ -1198,7 +1198,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall @Override public void positionLost(long frameNumber) { boolean useBLAST = WindowManagerGlobal.getInstance().useBLAST(); boolean useBLAST = WindowManagerGlobal.useBLAST(); if (DEBUG) { Log.d(TAG, String.format("%d windowPositionLost, frameNr = %d", System.identityHashCode(this), frameNumber)); Loading Loading @@ -1537,7 +1537,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall @Override public void invalidate(boolean invalidateCache) { super.invalidate(invalidateCache); if (!WindowManagerGlobal.getInstance().useBLAST()) { if (!WindowManagerGlobal.useBLAST()) { return; } final ViewRootImpl viewRoot = getViewRootImpl(); Loading
core/java/android/view/ViewRootImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -742,7 +742,7 @@ public final class ViewRootImpl implements ViewParent, loadSystemProperties(); mImeFocusController = new ImeFocusController(this); mUseBLASTAdapter = WindowManagerGlobal.getInstance().useBLAST(); mUseBLASTAdapter = WindowManagerGlobal.useBLAST(); } public static void addFirstDrawHandler(Runnable callback) { Loading
core/java/android/view/WindowManagerGlobal.java +4 −8 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ import java.util.ArrayList; public final class WindowManagerGlobal { private static final String TAG = "WindowManager"; private final boolean mUseBLASTAdapter; private static boolean sUseBLASTAdapter = false; /** * The user is navigating with keys (not the touch screen), so Loading Loading @@ -159,11 +159,6 @@ public final class WindowManagerGlobal { private Runnable mSystemPropertyUpdater; private WindowManagerGlobal() { try { mUseBLASTAdapter = getWindowManagerService().useBLAST(); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } @UnsupportedAppUsage Loading Loading @@ -191,6 +186,7 @@ public final class WindowManagerGlobal { if (sWindowManagerService != null) { ValueAnimator.setDurationScale( sWindowManagerService.getCurrentAnimatorScale()); sUseBLASTAdapter = sWindowManagerService.useBLAST(); } } catch (RemoteException e) { throw e.rethrowFromSystemServer(); Loading Loading @@ -235,8 +231,8 @@ public final class WindowManagerGlobal { /** * Whether or not to use BLAST for ViewRootImpl */ public boolean useBLAST() { return mUseBLASTAdapter; public static boolean useBLAST() { return sUseBLASTAdapter; } @UnsupportedAppUsage Loading