Merge "Only updateDisplayDecoration if not the default"

This commit is contained in:
TreeHugger Robot
2021-12-29 20:55:35 +00:00
committed by Android (Google) Code Review

View File

@@ -2856,7 +2856,10 @@ public final class ViewRootImpl implements ViewParent,
if (mSurfaceControl.isValid()) {
updateOpacity(mWindowAttributes, dragResizing,
surfaceControlChanged /*forceUpdate */);
if (surfaceControlChanged) {
// No need to updateDisplayDecoration if it's a new SurfaceControl and
// mDisplayDecorationCached is false, since that's the default for a new
// SurfaceControl.
if (surfaceControlChanged && mDisplayDecorationCached) {
updateDisplayDecoration();
}
}