Loading core/java/android/hardware/display/DisplayManagerInternal.java +2 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.util.IntArray; import android.util.SparseArray; import android.view.Display; import android.view.DisplayInfo; import android.view.SurfaceControl; /** * Display manager local system service interface. Loading Loading @@ -115,7 +116,7 @@ public abstract class DisplayManagerInternal { * Called by the window manager to perform traversals while holding a * surface flinger transaction. */ public abstract void performTraversalInTransactionFromWindowManager(); public abstract void performTraversal(SurfaceControl.Transaction t); /** * Tells the display manager about properties of the display that depend on the windows on it. Loading packages/SystemUI/src/com/android/systemui/ScreenDecorations.java +4 −1 Original line number Diff line number Diff line Loading @@ -239,10 +239,13 @@ public class ScreenDecorations extends SystemUI implements Tunable { | WindowManager.LayoutParams.FLAG_SLIPPERY | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN, PixelFormat.TRANSLUCENT); lp.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS; lp.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS | WindowManager.LayoutParams.PRIVATE_FLAG_NO_MOVE_ANIMATION; if (!DEBUG_SCREENSHOT_ROUNDED_CORNERS) { lp.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY; } lp.setTitle("ScreenDecorOverlay"); lp.gravity = Gravity.TOP | Gravity.LEFT; lp.layoutInDisplayCutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; Loading services/core/java/com/android/server/display/DisplayDevice.java +9 −9 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ abstract class DisplayDevice { private Rect mCurrentDisplayRect; // The display device owns its surface, but it should only set it // within a transaction from performTraversalInTransactionLocked. // within a transaction from performTraversalLocked. private Surface mCurrentSurface; // DEBUG STATE: Last device info which was written to the log, or null if none. Loading Loading @@ -122,7 +122,7 @@ abstract class DisplayDevice { /** * Gives the display device a chance to update its properties while in a transaction. */ public void performTraversalInTransactionLocked() { public void performTraversalLocked(SurfaceControl.Transaction t) { } /** Loading @@ -140,7 +140,7 @@ abstract class DisplayDevice { /** * Sets the mode, if supported. */ public void requestDisplayModesInTransactionLocked(int colorMode, int modeId) { public void requestDisplayModesLocked(int colorMode, int modeId) { } public void onOverlayChangedLocked() { Loading @@ -149,10 +149,10 @@ abstract class DisplayDevice { /** * Sets the display layer stack while in a transaction. */ public final void setLayerStackInTransactionLocked(int layerStack) { public final void setLayerStackLocked(SurfaceControl.Transaction t, int layerStack) { if (mCurrentLayerStack != layerStack) { mCurrentLayerStack = layerStack; SurfaceControl.setDisplayLayerStack(mDisplayToken, layerStack); t.setDisplayLayerStack(mDisplayToken, layerStack); } } Loading @@ -166,7 +166,7 @@ abstract class DisplayDevice { * mapped to. displayRect is specified post-orientation, that is * it uses the orientation seen by the end-user */ public final void setProjectionInTransactionLocked(int orientation, public final void setProjectionLocked(SurfaceControl.Transaction t, int orientation, Rect layerStackRect, Rect displayRect) { if (mCurrentOrientation != orientation || mCurrentLayerStackRect == null Loading @@ -185,7 +185,7 @@ abstract class DisplayDevice { } mCurrentDisplayRect.set(displayRect); SurfaceControl.setDisplayProjection(mDisplayToken, t.setDisplayProjection(mDisplayToken, orientation, layerStackRect, displayRect); } } Loading @@ -193,10 +193,10 @@ abstract class DisplayDevice { /** * Sets the display surface while in a transaction. */ public final void setSurfaceInTransactionLocked(Surface surface) { public final void setSurfaceLocked(SurfaceControl.Transaction t, Surface surface) { if (mCurrentSurface != surface) { mCurrentSurface = surface; SurfaceControl.setDisplaySurface(mDisplayToken, surface); t.setDisplaySurface(mDisplayToken, surface); } } Loading services/core/java/com/android/server/display/DisplayManagerService.java +11 −10 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ import android.util.SparseArray; import android.view.Display; import android.view.DisplayInfo; import android.view.Surface; import android.view.SurfaceControl; import com.android.internal.util.Preconditions; import com.android.server.AnimationThread; Loading Loading @@ -457,14 +458,14 @@ public final class DisplayManagerService extends SystemService { } @VisibleForTesting void performTraversalInTransactionFromWindowManagerInternal() { void performTraversalInternal(SurfaceControl.Transaction t) { synchronized (mSyncRoot) { if (!mPendingTraversal) { return; } mPendingTraversal = false; performTraversalInTransactionLocked(); performTraversalLocked(t); } // List is self-synchronized copy-on-write. Loading Loading @@ -1056,7 +1057,7 @@ public final class DisplayManagerService extends SystemService { return changed; } private void performTraversalInTransactionLocked() { private void performTraversalLocked(SurfaceControl.Transaction t) { // Clear all viewports before configuring displays so that we can keep // track of which ones we have configured. clearViewportsLocked(); Loading @@ -1065,8 +1066,8 @@ public final class DisplayManagerService extends SystemService { final int count = mDisplayDevices.size(); for (int i = 0; i < count; i++) { DisplayDevice device = mDisplayDevices.get(i); configureDisplayInTransactionLocked(device); device.performTraversalInTransactionLocked(); configureDisplayLocked(t, device); device.performTraversalLocked(t); } // Tell the input system about these new viewports. Loading Loading @@ -1150,7 +1151,7 @@ public final class DisplayManagerService extends SystemService { mVirtualTouchViewports.clear(); } private void configureDisplayInTransactionLocked(DisplayDevice device) { private void configureDisplayLocked(SurfaceControl.Transaction t, DisplayDevice device) { final DisplayDeviceInfo info = device.getDisplayDeviceInfoLocked(); final boolean ownContent = (info.flags & DisplayDeviceInfo.FLAG_OWN_CONTENT_ONLY) != 0; Loading @@ -1175,7 +1176,7 @@ public final class DisplayManagerService extends SystemService { + device.getDisplayDeviceInfoLocked()); return; } display.configureDisplayInTransactionLocked(device, info.state == Display.STATE_OFF); display.configureDisplayLocked(t, device, info.state == Display.STATE_OFF); // Update the viewports if needed. if (!mDefaultViewport.valid Loading Loading @@ -1233,7 +1234,7 @@ public final class DisplayManagerService extends SystemService { mHandler.sendMessage(msg); } // Requests that performTraversalsInTransactionFromWindowManager be called at a // Requests that performTraversals be called at a // later time to apply changes to surfaces and displays. private void scheduleTraversalLocked(boolean inTraversal) { if (!mPendingTraversal && mWindowManagerInternal != null) { Loading Loading @@ -2031,8 +2032,8 @@ public final class DisplayManagerService extends SystemService { } @Override public void performTraversalInTransactionFromWindowManager() { performTraversalInTransactionFromWindowManagerInternal(); public void performTraversal(SurfaceControl.Transaction t) { performTraversalInternal(t); } @Override Loading services/core/java/com/android/server/display/LocalDisplayAdapter.java +5 −6 Original line number Diff line number Diff line Loading @@ -584,10 +584,9 @@ final class LocalDisplayAdapter extends DisplayAdapter { } @Override public void requestDisplayModesInTransactionLocked( int colorMode, int modeId) { if (requestModeInTransactionLocked(modeId) || requestColorModeInTransactionLocked(colorMode)) { public void requestDisplayModesLocked(int colorMode, int modeId) { if (requestModeLocked(modeId) || requestColorModeLocked(colorMode)) { updateDeviceInfoLocked(); } } Loading @@ -597,7 +596,7 @@ final class LocalDisplayAdapter extends DisplayAdapter { updateDeviceInfoLocked(); } public boolean requestModeInTransactionLocked(int modeId) { public boolean requestModeLocked(int modeId) { if (modeId == 0) { modeId = mDefaultModeId; } else if (mSupportedModes.indexOfKey(modeId) < 0) { Loading @@ -623,7 +622,7 @@ final class LocalDisplayAdapter extends DisplayAdapter { return true; } public boolean requestColorModeInTransactionLocked(int colorMode) { public boolean requestColorModeLocked(int colorMode) { if (mActiveColorMode == colorMode) { return false; } Loading Loading
core/java/android/hardware/display/DisplayManagerInternal.java +2 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.util.IntArray; import android.util.SparseArray; import android.view.Display; import android.view.DisplayInfo; import android.view.SurfaceControl; /** * Display manager local system service interface. Loading Loading @@ -115,7 +116,7 @@ public abstract class DisplayManagerInternal { * Called by the window manager to perform traversals while holding a * surface flinger transaction. */ public abstract void performTraversalInTransactionFromWindowManager(); public abstract void performTraversal(SurfaceControl.Transaction t); /** * Tells the display manager about properties of the display that depend on the windows on it. Loading
packages/SystemUI/src/com/android/systemui/ScreenDecorations.java +4 −1 Original line number Diff line number Diff line Loading @@ -239,10 +239,13 @@ public class ScreenDecorations extends SystemUI implements Tunable { | WindowManager.LayoutParams.FLAG_SLIPPERY | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN, PixelFormat.TRANSLUCENT); lp.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS; lp.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS | WindowManager.LayoutParams.PRIVATE_FLAG_NO_MOVE_ANIMATION; if (!DEBUG_SCREENSHOT_ROUNDED_CORNERS) { lp.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY; } lp.setTitle("ScreenDecorOverlay"); lp.gravity = Gravity.TOP | Gravity.LEFT; lp.layoutInDisplayCutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; Loading
services/core/java/com/android/server/display/DisplayDevice.java +9 −9 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ abstract class DisplayDevice { private Rect mCurrentDisplayRect; // The display device owns its surface, but it should only set it // within a transaction from performTraversalInTransactionLocked. // within a transaction from performTraversalLocked. private Surface mCurrentSurface; // DEBUG STATE: Last device info which was written to the log, or null if none. Loading Loading @@ -122,7 +122,7 @@ abstract class DisplayDevice { /** * Gives the display device a chance to update its properties while in a transaction. */ public void performTraversalInTransactionLocked() { public void performTraversalLocked(SurfaceControl.Transaction t) { } /** Loading @@ -140,7 +140,7 @@ abstract class DisplayDevice { /** * Sets the mode, if supported. */ public void requestDisplayModesInTransactionLocked(int colorMode, int modeId) { public void requestDisplayModesLocked(int colorMode, int modeId) { } public void onOverlayChangedLocked() { Loading @@ -149,10 +149,10 @@ abstract class DisplayDevice { /** * Sets the display layer stack while in a transaction. */ public final void setLayerStackInTransactionLocked(int layerStack) { public final void setLayerStackLocked(SurfaceControl.Transaction t, int layerStack) { if (mCurrentLayerStack != layerStack) { mCurrentLayerStack = layerStack; SurfaceControl.setDisplayLayerStack(mDisplayToken, layerStack); t.setDisplayLayerStack(mDisplayToken, layerStack); } } Loading @@ -166,7 +166,7 @@ abstract class DisplayDevice { * mapped to. displayRect is specified post-orientation, that is * it uses the orientation seen by the end-user */ public final void setProjectionInTransactionLocked(int orientation, public final void setProjectionLocked(SurfaceControl.Transaction t, int orientation, Rect layerStackRect, Rect displayRect) { if (mCurrentOrientation != orientation || mCurrentLayerStackRect == null Loading @@ -185,7 +185,7 @@ abstract class DisplayDevice { } mCurrentDisplayRect.set(displayRect); SurfaceControl.setDisplayProjection(mDisplayToken, t.setDisplayProjection(mDisplayToken, orientation, layerStackRect, displayRect); } } Loading @@ -193,10 +193,10 @@ abstract class DisplayDevice { /** * Sets the display surface while in a transaction. */ public final void setSurfaceInTransactionLocked(Surface surface) { public final void setSurfaceLocked(SurfaceControl.Transaction t, Surface surface) { if (mCurrentSurface != surface) { mCurrentSurface = surface; SurfaceControl.setDisplaySurface(mDisplayToken, surface); t.setDisplaySurface(mDisplayToken, surface); } } Loading
services/core/java/com/android/server/display/DisplayManagerService.java +11 −10 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ import android.util.SparseArray; import android.view.Display; import android.view.DisplayInfo; import android.view.Surface; import android.view.SurfaceControl; import com.android.internal.util.Preconditions; import com.android.server.AnimationThread; Loading Loading @@ -457,14 +458,14 @@ public final class DisplayManagerService extends SystemService { } @VisibleForTesting void performTraversalInTransactionFromWindowManagerInternal() { void performTraversalInternal(SurfaceControl.Transaction t) { synchronized (mSyncRoot) { if (!mPendingTraversal) { return; } mPendingTraversal = false; performTraversalInTransactionLocked(); performTraversalLocked(t); } // List is self-synchronized copy-on-write. Loading Loading @@ -1056,7 +1057,7 @@ public final class DisplayManagerService extends SystemService { return changed; } private void performTraversalInTransactionLocked() { private void performTraversalLocked(SurfaceControl.Transaction t) { // Clear all viewports before configuring displays so that we can keep // track of which ones we have configured. clearViewportsLocked(); Loading @@ -1065,8 +1066,8 @@ public final class DisplayManagerService extends SystemService { final int count = mDisplayDevices.size(); for (int i = 0; i < count; i++) { DisplayDevice device = mDisplayDevices.get(i); configureDisplayInTransactionLocked(device); device.performTraversalInTransactionLocked(); configureDisplayLocked(t, device); device.performTraversalLocked(t); } // Tell the input system about these new viewports. Loading Loading @@ -1150,7 +1151,7 @@ public final class DisplayManagerService extends SystemService { mVirtualTouchViewports.clear(); } private void configureDisplayInTransactionLocked(DisplayDevice device) { private void configureDisplayLocked(SurfaceControl.Transaction t, DisplayDevice device) { final DisplayDeviceInfo info = device.getDisplayDeviceInfoLocked(); final boolean ownContent = (info.flags & DisplayDeviceInfo.FLAG_OWN_CONTENT_ONLY) != 0; Loading @@ -1175,7 +1176,7 @@ public final class DisplayManagerService extends SystemService { + device.getDisplayDeviceInfoLocked()); return; } display.configureDisplayInTransactionLocked(device, info.state == Display.STATE_OFF); display.configureDisplayLocked(t, device, info.state == Display.STATE_OFF); // Update the viewports if needed. if (!mDefaultViewport.valid Loading Loading @@ -1233,7 +1234,7 @@ public final class DisplayManagerService extends SystemService { mHandler.sendMessage(msg); } // Requests that performTraversalsInTransactionFromWindowManager be called at a // Requests that performTraversals be called at a // later time to apply changes to surfaces and displays. private void scheduleTraversalLocked(boolean inTraversal) { if (!mPendingTraversal && mWindowManagerInternal != null) { Loading Loading @@ -2031,8 +2032,8 @@ public final class DisplayManagerService extends SystemService { } @Override public void performTraversalInTransactionFromWindowManager() { performTraversalInTransactionFromWindowManagerInternal(); public void performTraversal(SurfaceControl.Transaction t) { performTraversalInternal(t); } @Override Loading
services/core/java/com/android/server/display/LocalDisplayAdapter.java +5 −6 Original line number Diff line number Diff line Loading @@ -584,10 +584,9 @@ final class LocalDisplayAdapter extends DisplayAdapter { } @Override public void requestDisplayModesInTransactionLocked( int colorMode, int modeId) { if (requestModeInTransactionLocked(modeId) || requestColorModeInTransactionLocked(colorMode)) { public void requestDisplayModesLocked(int colorMode, int modeId) { if (requestModeLocked(modeId) || requestColorModeLocked(colorMode)) { updateDeviceInfoLocked(); } } Loading @@ -597,7 +596,7 @@ final class LocalDisplayAdapter extends DisplayAdapter { updateDeviceInfoLocked(); } public boolean requestModeInTransactionLocked(int modeId) { public boolean requestModeLocked(int modeId) { if (modeId == 0) { modeId = mDefaultModeId; } else if (mSupportedModes.indexOfKey(modeId) < 0) { Loading @@ -623,7 +622,7 @@ final class LocalDisplayAdapter extends DisplayAdapter { return true; } public boolean requestColorModeInTransactionLocked(int colorMode) { public boolean requestColorModeLocked(int colorMode) { if (mActiveColorMode == colorMode) { return false; } Loading