Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db47a7d2 authored by Jorim Jaggi's avatar Jorim Jaggi Committed by android-build-merger
Browse files

Merge "Relayout before creating surface" into oc-dev am: b76845aa

am: ba19c9ef

Change-Id: Ic53f0a877d418a52202f8a4ba7ad2eff564d9e51
parents 413d3719 ba19c9ef
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1952,6 +1952,16 @@ public class WindowManagerService extends IWindowManager.Stub
            if (viewVisibility == View.VISIBLE &&
                    (win.mAppToken == null || win.mAttrs.type == TYPE_APPLICATION_STARTING
                            || !win.mAppToken.isClientHidden())) {

                // We are about to create a surface, but we didn't run a layout yet. So better run
                // a layout now that we already know the right size, as a resize call will make the
                // surface transaction blocking until next vsync and slow us down.
                // TODO: Ideally we'd create the surface after running layout a bit further down,
                // but moving this seems to be too risky at this point in the release.
                if (win.mLayoutSeq == -1) {
                    win.setDisplayLayoutNeeded();
                    mWindowPlacerLocked.performSurfacePlacement(true);
                }
                result = win.relayoutVisibleWindow(mergedConfiguration, result, attrChanges,
                        oldVisibility);
                try {