More Sync in More Places
Some operations weren't being done in sync transactions. This adds sync in a couple more places where it makes sense (particularly for display changes which aren't relevant until display changes are part of transitions). This also re-orders sync update on parent-change since onParentChanged sometimes does work and needs to have an accurate transaction to put it on. Bug: 179270750 Test: existing tests pass, system behavior doesn't change. Change-Id: I6eb0b541a88805ab7459175e163563ed869cdc8e
This commit is contained in:
@@ -1519,7 +1519,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
||||
private void setCornersRadius(WindowState mainWindow, int cornersRadius) {
|
||||
final SurfaceControl windowSurface = mainWindow.getClientViewRootSurface();
|
||||
if (windowSurface != null && windowSurface.isValid()) {
|
||||
Transaction transaction = getPendingTransaction();
|
||||
Transaction transaction = getSyncTransaction();
|
||||
transaction.setCornerRadius(windowSurface, cornersRadius);
|
||||
}
|
||||
}
|
||||
@@ -1531,7 +1531,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
||||
}
|
||||
layoutLetterbox(winHint);
|
||||
if (mLetterbox != null && mLetterbox.needsApplySurfaceChanges()) {
|
||||
mLetterbox.applySurfaceChanges(getPendingTransaction());
|
||||
mLetterbox.applySurfaceChanges(getSyncTransaction());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3426,7 +3426,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
|
||||
/** Updates the layer assignment of windows on this display. */
|
||||
void assignWindowLayers(boolean setLayoutNeeded) {
|
||||
Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "assignWindowLayers");
|
||||
assignChildLayers(getPendingTransaction());
|
||||
assignChildLayers(getSyncTransaction());
|
||||
if (setLayoutNeeded) {
|
||||
setLayoutNeeded();
|
||||
}
|
||||
|
||||
@@ -389,12 +389,12 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
|
||||
mParent.onChildAdded(this);
|
||||
}
|
||||
if (!mReparenting) {
|
||||
onSyncReparent(oldParent, mParent);
|
||||
if (mParent != null && mParent.mDisplayContent != null
|
||||
&& mDisplayContent != mParent.mDisplayContent) {
|
||||
onDisplayChanged(mParent.mDisplayContent);
|
||||
}
|
||||
onParentChanged(mParent, oldParent);
|
||||
onSyncReparent(oldParent, mParent);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user