Merge "Reduce unnecessary redraw of wallpaper with shell transition" into tm-qpr-dev am: 6caa590ae4

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18400684

Change-Id: I46d543efae25e4e2c6547073017001adec2c2b86
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
TreeHugger Robot
2022-05-20 12:57:36 +00:00
committed by Automerger Merge Worker
2 changed files with 8 additions and 2 deletions

View File

@@ -6086,7 +6086,8 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
rootTask.ensureActivitiesVisible(starting, configChanges, preserveWindows,
notifyClients);
});
if (mTransitionController.isCollecting()
if (mTransitionController.useShellTransitionsRotation()
&& mTransitionController.isCollecting()
&& mWallpaperController.getWallpaperTarget() != null) {
// Also update wallpapers so that their requestedVisibility immediately reflects
// the changes to activity visibility.

View File

@@ -300,7 +300,12 @@ class Transition extends Binder implements BLASTSyncEngine.TransactionReadyListe
}
}
if (mParticipants.contains(wc)) return;
mSyncEngine.addToSyncSet(mSyncId, wc);
// Wallpaper is like in a static drawn state unless display may have changes, so exclude
// the case to reduce transition latency waiting for the unchanged wallpaper to redraw.
final boolean needSyncDraw = !isWallpaper(wc) || mParticipants.contains(wc.mDisplayContent);
if (needSyncDraw) {
mSyncEngine.addToSyncSet(mSyncId, wc);
}
ChangeInfo info = mChanges.get(wc);
if (info == null) {
info = new ChangeInfo(wc);