Loading services/core/java/com/android/server/wm/AbsAppSnapshotController.java +13 −5 Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ abstract class AbsAppSnapshotController<TYPE extends WindowContainer, */ @VisibleForTesting static final int SNAPSHOT_MODE_NONE = 2; static final float THEME_SNAPSHOT_MIN_Length = 128.0f; protected final WindowManagerService mService; protected final float mHighResSnapshotScale; Loading Loading @@ -436,14 +437,21 @@ abstract class AbsAppSnapshotController<TYPE extends WindowContainer, final Rect taskBounds = source.getBounds(); final InsetsState insetsState = mainWindow.getInsetsStateWithVisibilityOverride(); final Rect systemBarInsets = getSystemBarInsets(mainWindow.getFrame(), insetsState); final int taskWidth = taskBounds.width(); final int taskHeight = taskBounds.height(); float scale = mHighResSnapshotScale; if (Flags.reduceTaskSnapshotMemoryUsage()) { final int minLength = Math.min(taskWidth, taskHeight); if (THEME_SNAPSHOT_MIN_Length < minLength) { scale = Math.min(THEME_SNAPSHOT_MIN_Length / minLength, scale); } } final SnapshotDrawerUtils.SystemBarBackgroundPainter decorPainter = new SnapshotDrawerUtils.SystemBarBackgroundPainter(attrs.flags, attrs.privateFlags, attrs.insetsFlags.appearance, taskDescription, mHighResSnapshotScale, mainWindow.getRequestedVisibleTypes()); final int taskWidth = taskBounds.width(); final int taskHeight = taskBounds.height(); final int width = (int) (taskWidth * mHighResSnapshotScale); final int height = (int) (taskHeight * mHighResSnapshotScale); scale, mainWindow.getRequestedVisibleTypes()); final int width = (int) (taskWidth * scale); final int height = (int) (taskHeight * scale); final RenderNode node = RenderNode.create("SnapshotController", null); node.setLeftTopRightBottom(0, 0, width, height); node.setClipToBounds(false); Loading Loading
services/core/java/com/android/server/wm/AbsAppSnapshotController.java +13 −5 Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ abstract class AbsAppSnapshotController<TYPE extends WindowContainer, */ @VisibleForTesting static final int SNAPSHOT_MODE_NONE = 2; static final float THEME_SNAPSHOT_MIN_Length = 128.0f; protected final WindowManagerService mService; protected final float mHighResSnapshotScale; Loading Loading @@ -436,14 +437,21 @@ abstract class AbsAppSnapshotController<TYPE extends WindowContainer, final Rect taskBounds = source.getBounds(); final InsetsState insetsState = mainWindow.getInsetsStateWithVisibilityOverride(); final Rect systemBarInsets = getSystemBarInsets(mainWindow.getFrame(), insetsState); final int taskWidth = taskBounds.width(); final int taskHeight = taskBounds.height(); float scale = mHighResSnapshotScale; if (Flags.reduceTaskSnapshotMemoryUsage()) { final int minLength = Math.min(taskWidth, taskHeight); if (THEME_SNAPSHOT_MIN_Length < minLength) { scale = Math.min(THEME_SNAPSHOT_MIN_Length / minLength, scale); } } final SnapshotDrawerUtils.SystemBarBackgroundPainter decorPainter = new SnapshotDrawerUtils.SystemBarBackgroundPainter(attrs.flags, attrs.privateFlags, attrs.insetsFlags.appearance, taskDescription, mHighResSnapshotScale, mainWindow.getRequestedVisibleTypes()); final int taskWidth = taskBounds.width(); final int taskHeight = taskBounds.height(); final int width = (int) (taskWidth * mHighResSnapshotScale); final int height = (int) (taskHeight * mHighResSnapshotScale); scale, mainWindow.getRequestedVisibleTypes()); final int width = (int) (taskWidth * scale); final int height = (int) (taskHeight * scale); final RenderNode node = RenderNode.create("SnapshotController", null); node.setLeftTopRightBottom(0, 0, width, height); node.setClipToBounds(false); Loading